+ 1
What is the mistake please
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) { Console.WriteLine ("Enter password"); int password = Convert.ToInt32(Console.ReadLine()); if (password = 4) { Console.WriteLine("correct password " + "hi again it's to see you again"); } else { Console.WriteLine("incorrect password"); } } } }
3 odpowiedzi
+ 2
The if statement has to have to ==
+ 2
if (password==4) instead of if(password=4)
+ 2
No problem :)