Advertisement
damesova

SpeedInfo [Mimi][PB]

May 2nd, 2019
475
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.60 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class SpeedInfo {
  4.     public static void main(String[] args) {
  5.         Scanner scanner = new Scanner(System.in);
  6.  
  7.         double speed = Double.parseDouble(scanner.nextLine());
  8.         String output;
  9.  
  10.         if (speed <= 10) {
  11.             output = "slow";
  12.         } else if (speed <= 50){
  13.             output = "average";
  14.         } else if(speed <=150){
  15.             output = "fast";
  16.         } else if(speed <=1000){
  17.             output = "ultra fast";
  18.         }else {
  19.             output = "extremely fast";
  20.         }
  21.  
  22.         System.out.println(output);
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement