import javax.swing.JOptionPane;
import java.util.Scanner;
public class firstcode {
public static void main(String[]args) {
/* LOGICAL OPERATORS
&& = (AND) both conditions must be true
|| = (OR) either conditons must be true
! = ( NOT ) reverses boolean value condition
*/
Scanner input1 = new Scanner(System.in);
System.out.println("type ( temp ) to run temperature program or type ( game ) to run game program ");
String response = input1.next();
if(response.equals("temp")) {
int temp = Integer.parseInt(JOptionPane.showInputDialog(" whats the temperature "));
if (temp > 30) {
System.out.println("its hot outside ");
}
else if ( temp >= 18 && temp <= 30) {
System.out.println("its warm outside ");
}
else if (temp < 18) {
System.out.print("its cold outside " );
}
}
else if(response.equals("game")) {
Scanner input2 = new Scanner(System.in);
System.out.println("Type\" Q \" or \"q\" to end the game ");
String response1 = input2.next();
if(response1.equals("q")|| response1.equals("Q")) {
System.out.println("Game is over ");
}
else {
System.out.println("Game is still continuing \"pew pew \"");
}
input2.close();
}
input1.close();
}
}