1059 Even Numbers

SemiColon
By -
0
URI Online Judge | 1059

Even Numbers

Write a program that prints all even numbers between 1 and 100, including them if it is the case.

Input

In this extremely simple problem there is no input.

Output

Print all even numbers between 1 and 100, including them, one by row.
Input SampleOutput Sample
2
4
6
...
100


Solution:

#include<stdio.h>
int main()
{
    double n;
    int i, cnt=0;
    for(i=1;i<=6;i++){
    scanf("%lf",&n);
    if (n>0){
        cnt++;
    }
  }

      printf("%d valores positivos\n",cnt);
      return 0;

}



Tags:

Post a Comment

0Comments

Post a Comment (0)