+ 3

Please tell me what's wrong with this code!

namespace SoloLearn {. class Program { static void Main(string[] args) { int a=0; Console.WriteLine("please enter the username:"); string user=Console.ReadLine(); Console.WriteLine("please enter the password:"); string pass=Console.ReadLine(); For(a;a<<3;a++) {if(user==ftmhrb && pass==123456) {Console.WriteLine("welcome"); else} {Console.WriteLine("ERROR");} } } } }

24th Sep 2019, 9:20 PM
Fs Mehrabi
Fs Mehrabi - avatar
4 Antworten
+ 4
Thank you
24th Sep 2019, 11:37 PM
Fs Mehrabi
Fs Mehrabi - avatar
+ 2
namespace SoloLearn { //. bug #1( . ) class Program { static void Main(string[] args) { int a=0; for(;a<3;a++) // bug #2(For); bug #3(a;); bug #4(<<) { Console.WriteLine("please enter the username:"); // debug #5 string user=Console.ReadLine(); //debug #6 Console.WriteLine("please enter the password:"); // debug #7 string pass=Console.ReadLine(); //debug #8 if(user=="ftmhrb" && pass=="123456") //bug #9(ftmhrb); bug #10(123456) {Console.WriteLine("welcome"); // bug #11 break; //debug #12( } ) else} // bug #13( } ) {Console.WriteLine("ERROR");} } } } }
24th Sep 2019, 10:54 PM
Solo
Solo - avatar
+ 1
Vasiliy nice code
26th Sep 2019, 5:56 PM
Vaibhav Pathak
Vaibhav Pathak - avatar
+ 1
26th Sep 2019, 10:26 PM
Solo
Solo - avatar