Question
Please solve these problems with c++! Thank you! 1) Create a file named passwords_access.cc, write a program that takes in user input a string representing
Please solve these problems with c++! Thank you!
1) Create a file named passwords_access.cc, write a program that takes in user input a string representing a password and an integer representing a user's age. Check if the password is at least 10 characters long and if the user's age is at least 12. If the password is at least 10 characters long and the user's age is at least 12, print "Access granted." If the password is less than 10 characters long and the user's age is at least 12, print "Password too short, access denied." If the password is at least 10 characters long and the user's age is less than 12, print "User too young, access denied." If neither condition is met, print "Access denied". 2) In a file named passwords_match.cc, write a program that takes in user input two strings representing passwords and checks if they match using string comparison methods.
If the passwords match, print "passwords matched" and if they don't match, print "passwords do not match".
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started