Created
October 25, 2016 02:26
-
-
Save silavsale/f42eeb0c79cdcf8064229866d399190b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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+"гр"); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment