Advertisement
semsem_elazazy

practical 13

Dec 29th, 2021
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.21 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5.     int n,i,s=0;
  6.     while(n)
  7.     {
  8.         scanf("%d",&n);
  9.         if(n==0)
  10.         break;
  11.         s=s+n;
  12.         i++;
  13.     }
  14.     printf("%d",s);
  15.     return 0;
  16. }
  17.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement