Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class SpeedInfo {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- double speed = Double.parseDouble(scanner.nextLine());
- String output;
- if (speed <= 10) {
- output = "slow";
- } else if (speed <= 50){
- output = "average";
- } else if(speed <=150){
- output = "fast";
- } else if(speed <=1000){
- output = "ultra fast";
- }else {
- output = "extremely fast";
- }
- System.out.println(output);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement