+ 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");} } } } }
5 Antworten
+ 4
Thank you
+ 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");}
}
}
}
}
+ 1
Vasiliy nice code
+ 1
Vaibhav Pathak, thank.