Advertisement
Guest User

Untitled

a guest
Mar 26th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. public static void main(String[] args) {
  2. Scanner lukija = new Scanner(System.in);
  3. System.out.println("Anna ensimmäinen luku: ");
  4. int luku1 = Integer.valueOf(lukija.nextLine());
  5. System.out.println("Anna toinen luku: ");
  6. int luku2 = Integer.valueOf(lukija.nextLine());
  7. int luku = 5;
  8.  
  9. if (luku > 8) {
  10. System.out.println("Suurempi luku: ");
  11. } else if (luku == 5) {
  12. System.out.println("Luvut ovat yhtä suuret" );
  13. }
  14. }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement