|
@@ -1,9 +1,25 @@
|
1
|
1
|
/**
|
2
|
2
|
* Created by iyasuwatts on 10/17/17.
|
3
|
3
|
*/
|
|
4
|
+import java.util.*;
|
4
|
5
|
public class Main {
|
5
|
6
|
|
6
|
7
|
public static void main(String[] args ){
|
7
|
|
-
|
|
8
|
+ Scanner response = new Scanner(System.in);
|
|
9
|
+
|
|
10
|
+ System.out.println("What's your name? ");
|
|
11
|
+ for(int i=0; i<5;i++){
|
|
12
|
+ String RespondersName = response.nextLine();
|
|
13
|
+
|
|
14
|
+ if (RespondersName.equals("Bob") || RespondersName.equals("bob") ||RespondersName.equals("BOB")) {
|
|
15
|
+ System.out.println("Greetings " + RespondersName);
|
|
16
|
+ //break;
|
|
17
|
+ } else if (RespondersName.equals("alice") || RespondersName.equals("Alice") || RespondersName.equals("ALICE")){
|
|
18
|
+ System.out.println("Greetings " + RespondersName);
|
|
19
|
+ //break;
|
|
20
|
+ } else {
|
|
21
|
+ System.out.println("Your name is not Alice or Bob");
|
|
22
|
+ }
|
|
23
|
+ }
|
8
|
24
|
}
|
9
|
25
|
}
|