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<=50; a++)
- {
- printf("%d", 2*a);
- sum=sum+(2*a);
- if(a<100)
- {
- printf(" + ");
- }
- }
- printf(" = %d", sum);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement