string name;
string charclass;
string teacher;
Console.WriteLine("What is your name?");
name = Console.ReadLine();
Console.WriteLine("Hello brave warrior " + name + ".");
Console.ReadLine();
Console.WriteLine("Which of the following classes do you wish to become Warrior,Mage, or Rogue?");
charclass = Console.ReadLine();
switch (charclass)
{
case "warrior":
Console.WriteLine("Your teacher is Balkan");
teacher = Balkan;
break;
case "mage":
Console.WriteLine("Your teacher is Artrix");
teacher = Artrix;
break;
}
Console.ReadLine();
Console.WriteLine("Welcome to " + teacher + "'s class");
i wrote this code and i want it to say the teacher name(last line) but it acts as though i never defined the name(right before the breaks) what do i need to change

New Topic/Question
Reply




MultiQuote








|