Advertisement
Guest User

Untitled

a guest
Jan 20th, 2020
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1.  
  2. import java.util.Scanner;
  3.  
  4. public class ArvosanatJaPisteet {
  5.  
  6. public static void main(String[] args) {
  7. Scanner lukija = new Scanner(System.in);
  8. int tulos = Integer.valueOf(lukija.nextLine());
  9.  
  10. if (tulos < 0) {
  11. System.out.println("mahdotonta!");
  12. } else if (tulos <= 49) {
  13. System.out.println("hylätty");
  14. } else if (tulos <= 59) {
  15. System.out.println("1");
  16. } else if (tulos <= 69) {
  17. System.out.println("2");
  18. } else if (tulos <= 79) {
  19. System.out.println("3");
  20. } else if (tulos <= 89) {
  21. System.out.println("4");
  22. } else if (tulos <= 100) {
  23. System.out.println("5");
  24. } else if (tulos > 100) {
  25. System.out.println("uskomatonta!");
  26. }
  27. }
  28.  
  29.  
  30.  
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement