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