Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as Java by hgates ( 6 years ago )
/**
 * @hgates 9/29
 * MadLib Assignment
 */

import java.util.Scanner;
 
public class InputExample //This is the file name (necessary)
{
   public static void main (String args []) //main method header (necessary) 
   {
       
     
       Scanner in = new Scanner(System.in); 
       
       System.out.println("Please enter an adjective1 : "); 
       
       String adjective1 = in.nextLine(); 
       
       
       
       
       System.out.println("Please enter a noun1 : "); 
       
       String noun1 = in.nextLine();
       
       
       
       
       System.out.println("Please enter a noun2 : "); 
       
       String noun2 = in.nextLine();
       
       
       
       
       System.out.println("Please enter an adverb : "); 
       
       String adverb = in.nextLine();
       
       
       
       
       System.out.println("Please enter an adjective2 : "); 
       
       String adjective2 = in.nextLine();
       
       
       System.out.println("There was once a " + adjective1 + " man" );
       System.out.println("He loved to play with " + noun1);
       System.out.println("He also liked to eat " + noun2);
       System.out.println("He ate this very " + adverb);
       System.out.println("One day, he thought it tasted " + adjective2 + " and he died");
       
   }
}

 

Revise this Paste

Parent: 110568
Your Name: Code Language: