Advertisement
MladenKarachanov

WeatherForecast

Jan 13th, 2023
681
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.41 KB | None | 0 0
  1. package ProgrammingBasics2;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class WeatherForecast {
  6.     public static void main(String[] args) {
  7.         Scanner scanner= new Scanner(System.in);
  8.         String time = scanner.nextLine();
  9.         if (time.equals("sunny")){
  10.             System.out.println("It's warm outside!");
  11.         }else{
  12.             System.out.println("It's cold outside!");
  13.         }
  14.  
  15.     }
  16. }
  17.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement