Question: Please help, I've been stuck on this for too long now. Someone else posted this same question and I typed in what they answered on

Please help, I've been stuck on this for too long now.
Someone else posted this same question and I typed in what they answered on that post but we havent started using [] brackets for these statements yet only () so i really need a response with no loops and no brackets so it'll be easier for me to understand. the second photo i attached is the rest of the code from the old response(again, please no brackets) and the third photo is the output the program gives me everytime I input the wrong answer. thank you for your time
Please help, I've been stuck on this for too long now.Someone else
posted this same question and I typed in what they answered on
that post but we havent started using [] brackets for these statements

Read in a 2-character string from input into variable usercode. Declare a boolean variable isvalid and set isvalid to true if the following conditions are met: - userCode does not contain two of the same character. - For alphabetic characters, userCode does not contain two of the same letter (regardless of case), Otherwise, set isValid to false. Ex: If the input is f=, then isValid is assigned with true, so the output is: Passcode is valid Ex. If the input is Qq, then isValid is assigned with false, so the output is: Passcode is not valid Note: Use getline(cin, userCode) to read the entire line from input into userCode. To check if userCode does not contain two of the same character, regardless of case, the toupper0 function can be used to convert both characters to the uppercase version. Then, the two returned values are checked for equality. The tolower0 function can also be used. Not all tests passed. Output differs. See highlights below. Your output Expected output 2. Compare output Input Your output

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!