
Even Between five Numbers
Adapted by Neilor Tonin, URI Brazil
Make a program that reads five integer values. Count how many of these values are even and print this information like the following example.
Input
The input will be 5 integer values.
Output
Print a message like the following example with all letters in lowercase, indicating how many even numbers were typed.
Input Sample | Output Sample |
7 |
3 valores pares |
URI - BEECROWD Online Judge 1065 Solve in C :
//Solved by Intesar#include <stdio.h>
int main() {
int x,c=0,i;
for(i=0;i<5;i++) { scanf("%d",&x); if(x%2==0) c++; } printf("%d valores pares\n",c);
return 0;}
0 Comments