Please tell me to trick solve password validation program | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 2

Please tell me to trick solve password validation program

26th Feb 2020, 7:07 AM
Java
Java - avatar
3 Answers
+ 2
The trick is to use search bar, there are many threads on this subject.
26th Feb 2020, 7:15 AM
Mihai Apostol
Mihai Apostol - avatar
+ 2
Learn to take input in strings and compare it..Learn how to use loops.. C program of password Validation #include <stdio.h> main() { char s[100]; scanf("%s",&s); int i,length ,numbers=0, special_characters=0; length=strlen(s); for(i=0;i<length;i++){ if(s[i]>='0'&&s[i]<='9'){ numbers++; } else if(s[i]=='!'||s[i]=='@'||s[i]=='#'||s[i]=='
#x27;||s[i]=='%'||s[i]=='&'||s[i]=='*'){ special_characters++; } } if(length>=7 && special_characters>=2 && numbers>=2){ printf("Strong"); } else { printf("Weak"); } } You can try this one.. .
2nd May 2020, 6:38 AM
View My Project
View My Project - avatar
0
Read the description carefully, try to implement to code.. If you stuck between, then ask here with sharing code.. Tricks in programming, I don't understand what you mean? There is no tricks programming.. except predefined functions if any suitable for a given problem..
26th Feb 2020, 7:54 AM
Jayakrishna 🇮🇳