Advertisement
Guest User

Untitled

a guest
Oct 25th, 2016
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. import java.util.Scanner;
  2. public class UmovnyiOperator {
  3.  
  4. public static void main(String[]args)
  5. {
  6. System.out.println("Введіть свій номер:");
  7. Scanner scan = new Scanner(System.in);
  8. int id = scan.nextInt();
  9. double tsina = 0.0;
  10.  
  11. if (id > 1000 && id < 55000)
  12. {
  13. tsina = 2.0;
  14. }
  15. else if (id >= 55000 && id < 100000)
  16. {
  17. tsina = 3.0;
  18. }
  19. else if (id == 0)
  20. {
  21. tsina = 4.0;
  22. }
  23. System.out.println("Ціна для вас: " + tsina+"гр");
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement