Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Users of a system are supposed to pick a 3 character pass code such that there is at least one character that is a digit
Users of a system are supposed to pick a 3 character pass code such that there is at least one character that is a digit (number) and one character that is not a letter or number. Something like "A7*" or "45!" or "$2C". The digit and the special symbol may be any of the three characters. Write a program that reads in three characters and prints YES if they meet the criteria and NO if they do not. Hints:
- Remember cctype has functions for isalpha, isdigit, and ispunct. Check the documentation here.
- Also remember that ! is NOT. You can express the idea "x is not a digit character" with:
!isdigit(x)
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