Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * Andy Huynh
- * CS170
- * March 19, 2018
- *
- * Exercise 15
- */
- import java.util.Scanner;
- public class passwords
- {
- public static void main(String[] args)
- {
- Scanner input = new Scanner(System.in);
- String[] usernames = {"Dog","Cat","Snake","Bird","Fox"};
- String[] passwords = {"Woof","Meow","Hiss","Chirp","What"};
- System.out.println("Enter username: ");
- int user = input.nextInt();
- System.out.println("Enter password: ");
- int pass = input.nextInt();
- if (user == ("Dog") && pass == ("Woof"))
- System.out.println("Access Granted!");
- else
- System.out.println("Access Denied!");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement