Help! Why won't it print the conditions? I input the number 20 from the keyboard but when I add the else statement on line 22 I get an error message.
package en.codegym.task.pro.task03.task0301;
import java.util.Scanner;
/*
Warm or cold
*/
public class Solution {
public static void main(String[] args) {
String cold = "It's cold outside";
String warm = "It's warm outside";
//write your code here
Scanner input = new Scanner(System.in);
int temperature = input.nextInt();
//int temperature = 50;
if (temperature < 0) {
System.out.println(cold);
System.out.println(warm);
}
}
}
} else {
But without seeing the problem I can not advice more.