Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database 19c DBA By Examples Installation And Administration

Authors: Ravinder Gupta

1st Edition

B09FC7TQJ6, 979-8469226970

More Books

Students also viewed these Databases questions

Question

suggest a range of work sample exercises and design them

Answered: 1 week ago