Why its not working? Help im new | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
22nd Dec 2018, 6:17 AM
qagura
qagura - avatar
2 Answers
+ 3
You used like this if(a > b); It is not valid. There should not be any semicolon after if statement. And you wrote like this Console.Writeline(); But it is Console.WriteLine(); (capital 'L')
22nd Dec 2018, 6:25 AM
Raj Chhatrala
Raj Chhatrala - avatar
+ 2
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 a=5; int b=10; if(a > b) { Console.WriteLine("a is greater than b"); } else; { Console.WriteLine("b is greaterthan a"); } } } }
22nd Dec 2018, 6:24 AM
Raj Chhatrala
Raj Chhatrala - avatar