Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class HelloWorld {
- public static void main(String[] args) {
- Scanner scan = new Scanner(System.in);
- double input = scan.nextDouble();
- if (input<20000) System.out.printf("%.2f",0.);
- else if (input < 40000) System.out.printf("%.2f",input*0.1);
- else if (input<60000)System.out.printf("%.2f",input*0.2);
- else System.out.printf("%.2f",input*0.3);}
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement