Starting from:

$30

CSE316-Offline Assignment 2-Solved

Q1: The user will input 3 numbers (single digit) and the program will output the second highest number. The sample input and output is given below:

Sample Input
Sample Output
9, 5, 8
8
9, 9, 6
6
9, 9, 9
All the numbers are equal
9, 6, 6
6
Q2: Suppose, a user is setting a password. Your password policy requires that the password contains:

•    At least one upper case character (41H-5AH)

•    At least one lower case character (61H-7AH)

•    At least one digit (30H-39H)

•    Other printable characters in the range 21H-7EH are allowed but not required

You will take as input a series of characters until the first key not listed above is pressed. You will then print whether the series of characters represent a valid password (i.e. contains at least one uppercase letter, lowercase letter and digit).

Sample Input
Sample Output
password
Invalid password
PassW0rd
Valid password
Pa$$w0rd
Valid password
Pass Word
Invalid password

More products