Advertisement
apez1

Term 1: Lesson 13 - Coding Activity 6

Sep 25th, 2018
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.58 KB | None | 0 0
  1.  
  2.  
  3.     import java.io.*;
  4. import static java.lang.System.*;
  5. import java.util.Scanner;
  6. import java.lang.Math;
  7.  
  8. public class Lesson_13_Activity_Six {
  9.           public static void main (String str []) throws IOException {
  10.    
  11.      Scanner scanner = new Scanner(System.in);
  12.  
  13.      double z;  
  14.      System.out.println("What is the temperature?");  
  15.      z = scanner.nextDouble();
  16.      
  17.      if(z < 99.0 || z > 102.0) {
  18.       System.out.println("WARNING");
  19.  
  20.      }
  21.      else {      
  22.       System.out.println("Temperature is OK");
  23.  
  24.      }
  25.      
  26.    
  27.        
  28.       }
  29.  }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement