Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- Scanner input = new Scanner(System.in);
- String answer;
- int loop = 1;
- while (loop ==1) {
- System.out.println("Please enter your password");
- answer = input.next();
- if (answer.equals("word")) {
- System.out.println("You a winner!");
- loop = 0 ;
- } else {
- System.out.println("You not a winner");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement