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