-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMadLibs.java
More file actions
30 lines (27 loc) · 1.01 KB
/
MadLibs.java
File metadata and controls
30 lines (27 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import java.util.Scanner;
//mad libs game
public class MadLibs {
public static void main(String[] args){
Scanner sc= new Scanner(System.in);
String adjective1;
String noun1;
String adjective2;
String verb1;
String adjective3;
System.out.print("enter an adjective(description): ");
adjective1 = sc.nextLine();
System.out.print("enter a noun(person): ");
noun1 = sc.nextLine();
System.out.print("enter an adjective(description): ");
adjective2 = sc.nextLine();
System.out.print("enter a verb (action): ");
verb1 = sc.nextLine();
System.out.print("enter an adjective(description): ");
adjective3 = sc.nextLine();
System.out.println("\nToday I went to a "+ adjective1 +" zoo");
System.out.println("I met famous "+ noun1+" in person");
System.out.println("He was "+adjective2+" and "+verb1+" screaming");
System.out.println("I was "+adjective3);
sc.close();
}
}