Skip to content

Instantly share code, notes, and snippets.

@hrshadhin
Last active December 16, 2015 13:49
Show Gist options
  • Save hrshadhin/5444416 to your computer and use it in GitHub Desktop.
Save hrshadhin/5444416 to your computer and use it in GitHub Desktop.
This program calculate the sum of 1 to 100
#include<stdio.h>
int main()
{
int i,sum=0;
for (i=1;i<=100;i++)
sum +=i;
printf("The sum of the all sequence 1 to %d is %d",100,sum);
return(0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment