Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class ArvosanatJaPisteet {
- public static void main(String[] args) {
- Scanner lukija = new Scanner(System.in);
- int tulos = Integer.valueOf(lukija.nextLine());
- if (tulos < 0) {
- System.out.println("mahdotonta!");
- } else if (tulos <= 49) {
- System.out.println("hylätty");
- } else if (tulos <= 59) {
- System.out.println("1");
- } else if (tulos <= 69) {
- System.out.println("2");
- } else if (tulos <= 79) {
- System.out.println("3");
- } else if (tulos <= 89) {
- System.out.println("4");
- } else if (tulos <= 100) {
- System.out.println("5");
- } else if (tulos > 100) {
- System.out.println("uskomatonta!");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement