0

Gotham City ReadLine Error

Can someone explain why it’s giving me a ReadLine overload error on my Gotham City Challenge? using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SoloLearn { class Program { static void Main(string[] args) { int input; input = Convert.ToInt32(Console.ReadLine()); if (input < 5){ Console.WriteLine("I got this!"); } else if (input >= 5 && input < 10) { Console.WriteLine("Help me batman"); } else if (input > 10){ Console.ReadLine("Good Luck out there!"); } } } }

22nd Jan 2020, 2:46 PM
Zac
Zac - avatar
2 ответов
+ 3
The error is from Good Luck line. You should use WriteLine
22nd Jan 2020, 2:50 PM
Mihai Apostol
Mihai Apostol - avatar
+ 3
on else if , u wrote "ReadLine" it should be WriteLine cuz you wanna print it ;)
22nd Jan 2020, 3:00 PM
Sepehr Farid
Sepehr Farid - avatar