Question: Matlab code Write a program that asks and checks that the user entered any valid four-digit integer number such as 1630, which indicates the time,
Matlab code
Write a program that asks and checks that the user entered any valid four-digit integer number such as 1630, which indicates the time, as an input and prints 16:30 pm. Check that the entered number is a valid four-digit number, if it is not valid print "NOT VALID NUMBER. Note that there is a . that separates between the second and third digits. Solve it using nested if else statement (start from 10:00 to 23:59) Whoever prints (00:00 to 10:00) will get bonus (1 mark) for example: 08:04 Please enter a valid 4-digit number: 1630 Output should be: 16:30 pm Please enter a valid 4-digit number: 9910 Output should be: Invalid Number
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
