Here is what I wrote so far,
but it's not working for some reason, and I am getting an error called "unreachable code detected" on Console.Write("press Enter to continue");
Halp~~ QQQQ
static void Main(string[] args)
{
//menu
Console.WriteLine("<
Console.WriteLine("1 - Celsius (C) to Fahrenheit (F)");
Console.WriteLine("2 - Fahrenheit (F) to Celsius (C)");
Console.WriteLine("Q - Quit\n");
Console.Write("Choose (1, 2, or Q):");
//User input
string optionChoice = Console.ReadLine();
optionChoice = Console.ReadLine();
switch (optionChoice)
{
case "1":
Console.WriteLine("Celsius (C) to Fahrenheit (F)");
break;
case "2":
Console.WriteLine("Fahrenheit (F) to Celsius (C)");
break;
case "Q":
case "q":
Console.WriteLine("Bye bye~");
break;
default:
Console.WriteLine("{0} is not valid", optionChoice);
break;
Console.Write("press Enter to continue"); //Where error is
Console.ReadLine();
{
while (optionChoice != "Q" && optionChoice != "q") ;
}
}

VulpesRank #55 · 29.2K reputationPosted Sep 20, 2014, 11:30 AM EDT
Dipankar BiswasRank #992 · 2K reputationPosted Sep 20, 2014, 11:24 AM EDT
>Console.WriteLine("Not working!!!");
is not being reached because you're returning out of the function just prior to it with:
>return avgChars;
Obviously returning exits the code block
see more..
https://answers.yahoo.com/question/index?qid=20120120002605AAJNIuN
VulpesRank #55 · 29.2K reputationPosted Sep 20, 2014, 1:18 PM EDT
However, I would place the code for the conversions in separate methods within that class as this will make your program easier to follow.
I've done one of the conversions to show you what I mean:
Chisato N8 reputationPosted Sep 20, 2014, 12:45 PM EDT
Thank you.
I also have an additional question.
So, if I want to continue on that program to "Celsius (C) to Fahrenheit (F)" and "Fahrenheit (F) to Celsius (C)", do I just continue writing on the same class?
Chisato N8 reputationPosted Sep 23, 2014, 5:26 AM EDT
It's working well :)