repl.it
@Brawn/

While Loop Coding Questions

Java

No description

fork
loading
Files
  • Main.java
  • jdt.ls-java-project
Main.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner input = new Scanner(System.in);
		System.out.println("Enter two numbers:");

		int first = input.nextInt();
		int second = input.nextInt();

		if(first % 2 != 0){
			first ++;
		}

		while(first <= second){
			System.out.print(first+" ");
			first += 2;
		}
  	}
}

//321011
//84212002
//40 19 2 9 0 4 0 4

/*
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {

		Scanner input = new Scanner(System.in);
		System.out.println("Enter the Scores:");

		double scores = input.nextDouble();

		if(scores == -1){
			
		}
//INSERT YOUR CODE
	}
}

*/
?