Sunday, February 21, 2016

URI 1065 - Even Between five Numbers

#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 :)