Guest User

Untitled

a guest
May 22nd, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. #include <stdio.h>
  2. main()
  3. {
  4. int a,b,c,d,e,k;
  5. int f,g,h,i,j = 0;
  6. printf("Unesi 5 brojeva: ");
  7. scanf("%d,%d,%d,%d,%d",&a,&b,&c,&d,&e);
  8. if(a%2==0)
  9. {
  10. f=a;
  11. }
  12. if(b%2==0)
  13. {
  14. g=b;
  15. }
  16. if(c%2==0)
  17. {
  18. h=c;
  19. }
  20. if(d%2==0)
  21. {
  22. i=d;
  23. }
  24. if(e%2==0)
  25. {
  26. j=e;
  27. }
  28. k=f+g+h+i+j;
  29. printf("Zbroj svih parnih brojeva je: %d",k);
  30. scanf("%d");
  31. }
Add Comment
Please, Sign In to add comment