Advertisement
lastephanieee

Zbir na broevi while

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