+ 1

What is my problme ?

pls chech the photo on my instagram so i can found that why my programm says error instagram @Master_Fjj

13th Jan 2017, 11:21 AM
Master_Fjj
4 Answers
+ 2
There is nothing wrong with your code! I tested it in Visual Studio! What compiler are you using? I included it in Main method, which is necessary for any code to work! static void Main(string[] args) { int num; string input; Console.WriteLine("input a num "); input = Console.ReadLine(); num = int.Parse(input); switch (num) { case 1: Console.WriteLine("one"); break; case 2: Console.WriteLine("two"); break; case 3: Console.WriteLine("three"); break; case 4: Console.WriteLine("four"); break; default: Console.WriteLine("its more than 4 nums"); break; } Console.ReadKey(); }
13th Jan 2017, 3:12 PM
Mitran Constantin Bogdan
Mitran Constantin Bogdan - avatar
+ 1
thanks mitran my prob is solved
13th Jan 2017, 3:28 PM
Master_Fjj
0
int num ; string input; Console.WriteLine("input a num "); input=Console .ReadLine(); num =int .Parse(input ); switch (num) { case 1: Console.WriteLine("one"); break; case 2: Console.WriteLine("two"); break; case 3: Console.WriteLine("three"); break; case 4: Console.WriteLine("four"); break ; default : Console.WriteLine("its more than 4 nums"); break ; } Console.ReadKey();
13th Jan 2017, 11:22 AM
Master_Fjj
0
what is wrong ????
13th Jan 2017, 11:22 AM
Master_Fjj