+ 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
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();
}
+ 1
thanks mitran my prob is solved
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();
0
what is wrong ????