URI Online Judge Solution 1059 - Even Number Solution | Beginner
URI Main Problem Link - https://www.urionlinejudge.com.br/judge/en/problems/view/1059
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 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:
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.
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