Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- main()
- {
- int a,b,c,d,e,k;
- int f,g,h,i,j = 0;
- printf("Unesi 5 brojeva: ");
- scanf("%d,%d,%d,%d,%d",&a,&b,&c,&d,&e);
- if(a%2==0)
- {
- f=a;
- }
- if(b%2==0)
- {
- g=b;
- }
- if(c%2==0)
- {
- h=c;
- }
- if(d%2==0)
- {
- i=d;
- }
- if(e%2==0)
- {
- j=e;
- }
- k=f+g+h+i+j;
- printf("Zbroj svih parnih brojeva je: %d",k);
- scanf("%d");
- }
Add Comment
Please, Sign In to add comment