Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- int a, sum=0;
- for(a=1; a<=100; a++)
- {
- printf("%d",a);
- sum = sum+a;
- if(a<100)
- {
- printf(" + ");
- }
- }
- printf(" = %d", sum);
- printf("\n\n");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement