URI Online Judge | 1059 || Even number Problem - Online Judge Solution

Latest

It is a free Online judges problems solution list. Here you can find UVA online Judge Solution, URI Online Judge Solution, Code Marshal Online Judge Solution, Spoz Online Judge Problems Solution

Sunday, November 8, 2015

URI Online Judge | 1059 || Even number Problem

URI Online Judge Solution 1059 - Even Number Solution | Beginner




Problem Name: URI Problem 1059
Problem Number : URI Problem 1059 Solution
Online Judge : URI Online Judge Solution
Level: Beginner
Solution Language : C, C plus plus

URI Online Judge | 1059 || Even number Problem

URI Solution 1059 Code in C:


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


Tags: Uri solve , Uri solution, URI oj Solve, URI Online Judge Solution list, URI 1059 solution in C, URI 1059 code in C


The way for solving this problem:

This is a simple program of if-else.This program will also be solved in other language like C++, Java,Python.Though I first learn C programming, I like this programming language so much.

Step 1:


 for( i =2; i <= n; i = i+2)
 {
  printf("%d\n", i);
 }

First take a loop which is start from 2 and it's run upto 100 = n and increment is 2 after finishing one loop and then print them.

No comments:

Post a Comment