Is there a smarter way solving Password Validation using if statements ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Is there a smarter way solving Password Validation using if statements ?

Hey, I just completed the code coach password validation in C++. My solution uses switch cases for every single character. I'm wondering if there is a smarter way to do this using if statements. https://code.sololearn.com/cSYW7yRFduus

31st Aug 2021, 2:41 AM
Lennart Krauch
Lennart Krauch - avatar
1 Answer
0
Thanks for the nudge ✩✮★✮✩ I will give it another go later. I kinda knew using a lot of switch cases wasn't ideal.
31st Aug 2021, 3:25 AM
Lennart Krauch
Lennart Krauch - avatar