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

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 developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.