Can someone Tell me what did I do wrong here | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Can someone Tell me what did I do wrong here

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 Health = 100; if (Health >= 50); Console.WriteLine("Cant Drink Health potion"); } else if (Health < 50); { Console.WriteLine("Health has been restored"); } } }

25th Sep 2019, 11:39 PM
Sw'S AMV
Sw'S AMV - avatar
3 Answers
+ 3
One does not use semicolons after using an if statement.
25th Sep 2019, 11:44 PM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
26th Sep 2019, 2:39 AM
Maninder $ingh
Maninder $ingh - avatar
0
thank you but there is still many errors i don't know where did I go wrong?
25th Sep 2019, 11:52 PM
Sw'S AMV
Sw'S AMV - avatar