# URI Online Judge Solution 1059 Even Numbers – Solution in C, C++, Java, Python and C#

### URI Online Judge Solution 1059 Even Numbers – Solution in C, C++, Java, Python and C#

URI Online Judge Solution 1059 Even Numbers| Beginner

Problem Name: 1059 Even Numbers Solution
Problem Number : URI – 1059 Even Numbers solution
Online Judge : URI Online Judge Solution
Category: Beginner
Solution Language : C,C plus plus, java, python, c#(c sharp)

### URI 1059 Even Numbers Code in C / URI 1059 Even Numbers solution in C:

#include <stdio.h>

int
main() {
int
i;
for
(i = 1; i <= 100; ++i)
{

if
(i % 2 == 0)
{

printf("%in", i);
}
}

return
0;
}

Or Solve URI 1059 problem in another way using another increment system

#include <stdio.h>
int main() {
int
i;
for
(i=2; i<=100; i=i+2)
{

printf("%dn",i);
}

return
0;
}

### URI 1059 Even Numbers Code in C++ / URI 1059 Even Numbers solution in CPP:

#include <iostream>
using namespace std;

int
main()
{

for
(int i = 1; i <= 100; ++i)
{

if
(i % 2 == 0)
{

cout << i << endl;
}
}

return
0;
}

### URI 1059 Even Numbers Code in java/ URI 1059 Even Numbers solution in Java:

public class
Main {

public static
void main(String[] args) {
int
i;
for
(i = 2; i <= 100; i+=2) {
System.out.println(i);

}
}
}

or just

public class Main {

public static
void main(String[] args) {
int
i;
for
(i = 2; i <= 100; i=i+2) {
System.out.println(i);

}
}
}

Note:
Use i+=2 instead of i = i+2
Because it is faster than that.

### URI Solution 1059 Even Numbers Code / URI 1059 Even Numbers solution in  C# (C Sharp):

Demonstration:

Note:
Use i+=2 instead of i = i+2
Because it is faster than that.

Just implement this in coding. Since having any problem just put a comment below. Thanks

Tags: URI Online Judge Solution, URI OJ Solution list, URI Problems Solution, URI solver, URI all problem solution list, URI even number code in C, URI 1059 code in C++, URI 1059 Even Numbers solution in C, URI solution, URI 1059 Even Numbers solution in C,URI 1059 Even Numbers solution in C++-CPP,URI 1002 solution in C# (C sharp),URI 1002 solution in Java,URI 1059 Even Numbers solution in Python,

#### By Maniruzzaman Akash

Maniruzzaman Akash is a freelance web developer with most popular Laravel PHP frameork and Vue JS