Skip to content

Instantly share code, notes, and snippets.

@silavsale
Created October 25, 2016 02:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save silavsale/f42eeb0c79cdcf8064229866d399190b to your computer and use it in GitHub Desktop.
Save silavsale/f42eeb0c79cdcf8064229866d399190b to your computer and use it in GitHub Desktop.
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