-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOperators.java
More file actions
27 lines (24 loc) · 807 Bytes
/
Operators.java
File metadata and controls
27 lines (24 loc) · 807 Bytes
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
import java.util.Scanner;
public class Operators{
public static void main(String[] args){
int temp = 25;
Scanner scanner = new Scanner(System.in);
System.out.println("You are playing a game! Press q or Q to quit");
String response = scanner.next();
if (response.equals("q") || response.equals("Q")){
System.out.println("You quit the game");
}
else{
System.out.println("You are still playing the game");
}
// if (temp > 30){
// System.out.println("It is hot outside");
// } else if (temp >= 20 && temp <= 30) {
// System.out.println("It is warm outside");
// }
// else {
// System.out.println("It is cold outisde");
// }
return;
}
}