Advertisement
EconomicSerg

Conversation

Jan 8th, 2021
291
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.38 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Conversation
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.  
  10.             Console.WriteLine("Hello! What is the name of your character?");
  11.  
  12.             string userName = Console.ReadLine();
  13.  
  14.             Console.WriteLine("Hello, " + userName + "! How is your day?");
  15.             Console.ReadLine();
  16.  
  17.             Console.WriteLine("Well, I don't know what you said, but I hope it was a nice thing!");
  18.             Console.WriteLine("Anyways, I need help with my math problem. Can you tell me what 9 + 10 is?");
  19.  
  20.             int answer;
  21.  
  22.             answer = Convert.ToInt32(Console.ReadLine());
  23.             if (answer == 19)
  24.             {
  25.                 Console.WriteLine("Thank you!");
  26.                 Console.WriteLine("*The next day*\nOk, where is your answer?\nOh, my answer is " + answer);
  27.                 Console.WriteLine("Oh, well, good job because you got it right!\nYes!");
  28.             } else
  29.             {
  30.                 Console.WriteLine("Thank you!");
  31.                 Console.WriteLine("*The next day*\nOk, where is your answer?\nOh, my answer is " + answer);
  32.                 Console.WriteLine("Oh, well, you got it wrong!\nAww man! Note to self: 'never take answers from people I don't really know.'");
  33.             }
  34.  
  35.  
  36.             // Wait before closing
  37.             Console.ReadKey();
  38.         }
  39.     }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement