URI Problem (Six Odd Numbers) 1070:
Six Odd Numbers is a basic problem on URI online judge for novice problem solver.
You can find details on this Link.
import java.util.Scanner;
/**
* @Author : Muhammad Harun-Or-Roshid
* @Date : Oct 14, 2016
* @Time : 9:36:31 PM
*/
public class Uri1070 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int x = sc.nextInt();
int count = 0;
if (x > 0) {
while (count < 6) {
if (x % 2 != 0) {
count++;
System.out.println(x);
}
x++;
}
}
}
}
0 Comments