Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class UmovnyiOperator {
- public static void main(String[]args)
- {
- System.out.println("Введіть свій номер:");
- Scanner scan = new Scanner(System.in);
- int id = scan.nextInt();
- double tsina = 0.0;
- if (id > 1000 && id < 55000)
- {
- tsina = 2.0;
- }
- else if (id >= 55000 && id < 100000)
- {
- tsina = 3.0;
- }
- else if (id == 0)
- {
- tsina = 4.0;
- }
- System.out.println("Ціна для вас: " + tsina+"гр");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement