while ((userinput[0]==userinput[1]||userinput[0]==userinput[2]||userinput[0]==userinput[3]||userinput[0]==userinput[4])&&(userinput[2]==userinput[1]||userinput[2]==userinput[2]||userinput[2]==userinput[3]||userinput[1]==userinput[3]))

If the user types ABCC, the program must show double letter....but sometimes the code up there doesn't work correctly....suggestions or fix?

Recommended Answers

userinput[2] == userinput[2] ??

C'mon! ;)

When you have a complex line of code, break it up into multiple lines of code, so each line of code is easier to understand, and debug.

Jump to Post

All 2 Replies

userinput[2] == userinput[2] ??

C'mon! ;)

When you have a complex line of code, break it up into multiple lines of code, so each line of code is easier to understand, and debug.

Ahahahahaha i didn't notice that!!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.