Saturday, April 30, 2016

URI Online Judge Solution 1059 in C language || Even Numbers

Main link: https://www.urionlinejudge.com.br/judge/en/problems/view/1059

URI Online Judge | 1059

Even Numbers

Adapted by Neilor Tonin, URI  Brazil
Timelimit: 1
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


URI Online Judge Solution 1059 in C language || Even Numbers

#include<stdio.h>
int main()
{
int n = 100,i;
for( i =2; i <= n; i=i+2)
{
printf("%d\n", i);
}
return 0;
}


No comments:
Write comments

To know more about the problem, give us your valuable commment. We'll try to help you. Thanks

All rights reserved ©2016 -URI ONLINE JUDGE SOLUTION | Developed by Maniruzzaman Akash

© 2016 URI ONLINE JUDGE SOLUTION. Developed by Maniruzzaman Akash | Distributed By Gooyaabi Templates
Powered by Blogger.