Question: Write a program that asks the user to enter a favorite color, a favorite food, a favorite animal, and the first name of a friend
Write a program that asks the user to enter a favorite color, a favorite food, a favorite animal, and the first name of a friend or relative. The program should then print the following two lines, with the user’s input replacing the items in italics:
I had a dream that Name ate a Color Animal and said it tasted like Food!
For example, if the user entered blue for the color, hamburger for the food, dog for the animal, and Jake for the person’s name, the output would be I had a dream that Jake ate a blue dog and said it tasted like hamburger!
Don’t forget to put the exclamation mark at the end.
Step by Step Solution
3.51 Rating (161 Votes )
There are 3 Steps involved in it
public class SillySentence public static void mainString ar... View full answer
Get step-by-step solutions from verified subject matter experts
