'F' → Fullscreen
Copy template-console and rename the copy 1-04-conversation. Open its Program.cs file.
Console.Write("What is your name? ");string name = Console.ReadLine();
Console.WriteLine($"Nice to meet you, {name}!");favoriteGame.Console.Write("What is your name? ");string name = Console.ReadLine();
Console.Write("What is your favorite game? ");string favoriteGame = Console.ReadLine();
Console.WriteLine();Console.WriteLine($"Nice to meet you, {name}!");Console.WriteLine($"I have heard good things about {favoriteGame}.");minutesText.int variable minutes.Console.Write("What is your name? ");string name = Console.ReadLine();
Console.Write("What is your favorite game? ");string favoriteGame = Console.ReadLine();
Console.Write("How many minutes do you play in a typical week? ");string minutesText = Console.ReadLine();int minutes = int.Parse(minutesText);
Console.WriteLine();Console.WriteLine($"Nice to meet you, {name}!");Console.WriteLine($"I have heard good things about {favoriteGame}.");Console.WriteLine($"You entered {minutes} minutes.");thirty.System.FormatException in the terminal.The AP exam's INPUT() accepts a value directly. It does not show C#'s separate text-reading and parsing steps.
Console.WriteLine("How many minutes?");string minutesText = Console.ReadLine();int minutes = int.Parse(minutesText);Console.WriteLine(minutes);DISPLAY("How many minutes?")minutes ← INPUT()DISPLAY(minutes)Run the finished program and enter the example answers below. Your output should follow the same conversation pattern.
What is your name? Sam [Enter]What is your favorite game? Minecraft [Enter]How many minutes do you play in a typical week? 120 [Enter]
Nice to meet you, Sam!I have heard good things about Minecraft.You entered 120 minutes.Answer the following questions before submitting your work.
Console.ReadLine()?minutesText before assigning a value to minutes?thirty cause an exception rather than a compiler error?Submit your completed activity sheet. Keep 1-04-conversation in your workspace.