Welcome

>>>Welcome to my "CODE BAZAR"
Code marshal
URI online judge
Others
Code marshal
URI online judge
Others
Code marshal
URI online judge
Others

Update ✔✔✔ Upcoming programming book (.pdf) "Programming Contest (data structures and algorithms) by Md. Mahbub Hasan & "Graph Algorithms" by Safayat Asraf "****** Date: 20 March, 2019****Hazrat Ali****

Monday, 14 November 2016

URI-1059

URI Online Judge | 1059

Even Numbers

Adapted by Neilor Tonin, URI  Brazil
Timelimit: 1
Problem link Click here
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()
{
    int i;
    for(i=1;i<=100;i++)
        if(i%2==0){
            printf("%d\n",i);
        }
        return 0;
}

No comments:

Post a Comment