Created
October 8, 2012 04:35
-
-
Save rawaludin/3850742 to your computer and use it in GitHub Desktop.
Belajar AND dan OR di Java
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
class BelajarVariable | |
{ | |
public static void main(String[] args) { | |
int username = 1; | |
int password = 45; | |
if (username>=10 || password<=10) { | |
System.out.println("Anda berhasil login"); | |
if (username>=10) { | |
System.out.println("Username benar!"); | |
} | |
if (password<=10) { | |
System.out.println("Password benar!"); | |
} | |
} else { | |
System.out.print("Username dan password tidak cocok!"); | |
if (username>=10) { | |
System.out.println("Username benar!"); | |
} | |
if (password<=10) { | |
System.out.println("Password benar!"); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment