Question: Question 2:Using the switch statement, write a menu driven program (i) To check and display whether a number input by the user is a
Question 2:Using the switch statement, write a menu driven program (i) To check and display whether a number input by the user is a composite number or not (A number is said to be a composite, if it has one or more than one factors excluding 1 and the number itself). Example: 4, 6, 8, 9... (ii) To find the smallest digit of an integer that is input: Sample input: 6524 Sample output: Smallest digit is 2 For an incorrect choice, an appropriate error message should be displayed
Step by Step Solution
3.63 Rating (164 Votes )
There are 3 Steps involved in it
The detailed ... View full answer
Get step-by-step solutions from verified subject matter experts
