Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Zhenghao Zhu
- //Madlib Project
- //10/26/2015
- import java.util.Scanner;
- public class Madlib {
- public static void main (String []args){
- Scanner input = new Scanner(System.in);
- System.out.println("What's your name?");
- String fullname = input.next();
- System.out.println(fullname + " do you want to take a Madlib?");
- String decision = input.next();
- System.out.println(fullname + " could you give a color?");
- String color = input.next();
- System.out.println(fullname + " could you give a verb?");
- String verb = input.next();
- System.out.println(fullname + " could you give me an adjective?");
- String adj = input.next();
- System.out.println(fullname + " could you give me a noun?");
- String noun = input.next();
- System.out.println(fullname + " give me an verb?");
- String verb2 = input.next();
- System.out.println(fullname + " can you give me a dark adjective?");
- String dadj = input.next();
- System.out.println(fullname + " can you give me a sporty noun?");
- String snoun = input.next();
- System.out.println(fullname + " give me another color?");
- String color2 = input.next();
- System.out.println(fullname + " can you give me a liquidy adj?");
- String ladj = input.next();
- System.out.println(fullname + " could you give me an animal in plural?");
- String animal = input.next();
- System.out.println(fullname + " could you give me a sandwich ingredient?");
- String ingredient = input.next();
- System.out.println("Our school cafeteria has really " + color + " food." +
- " Just thinking about it makes my stomach " +
- verb + "." +
- " The spaghetti is " + adj +
- " and tastes like " + noun + "." +
- " One day, I swear one of my meatballs started to pet " + verb2 +
- "!" + " The turkey tacos are really " + dadj +
- " and look kind of like old " + snoun + "." +
- " My friend Dana actually likes the meatloaf, even though it's " + color2 +
- " and " + ladj + "." +
- "I call it \"mystery meatloaf\" and think it's really made out of " + animal +
- "." + " My dad said he'd make my lunches, but the first day, he made me a sandwich out of " + ingredient +
- " and peanut butter!" + " I think I'd rather take my chances with the cafeteria!");
- System.out.println(" ");
- System.out.println("Haha, you said " + decision + " to taking the Madlib, I did it anyway!");
- System.out.println("Later " + fullname + "!");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement