Advertisement
veronikaaa86

06. Speed Info

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