Wednesday, January 20, 2016

URI solution of 1065 - Even Between five Numbers

URI solution of 1065 - Even Between five Numbers

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <stdio.h>
  
int main() {
  
   int i, sum=0;
  int n;
   for(i=1; i<=5; i++){
    scanf("%d",&n);
        
       if(n%2==0){
           sum+=1;
       }
   }
      printf("%d valores pares\n",sum);
  
    return 0;
}

No comments:

Post a Comment

Thank you for commenting. Please wait for response :)