+ 1
Idk what is wrong with this code
static void Main(string[] args) { Console.Writeline("wirte smt"); int a=Console.ReadLine(); if(a<5){ Console.Writeline ("I got this!");} else if(a>=5 and a<=10){ Console.Writeline ("Help me Batman");} else { Console.Writeline ("Good Luck out there!"); }
2 Respostas
+ 6
Console.ReadLine() reads only Strings. You need to convert it to Integer:
int n = Convert.ToInt32(Console.ReadLine());
+ 1
Thank you really