Assignment 2
Assignment 2
Write a menu driven (switch case) program to find the volume of these solids by
taking suitable variables and data types. Display the output with proper messages.
2. Write a program to enter any number of user’s choice and check whether the
given number is:
a) Divisible by 11
b) Divisible by 3 and 5
c) Divisible by 7
3 . Write a program to input a number and check if it is a single digit, double digit,
or a three digit number. Display the output with proper messages.
5.
Write a program to show a menu to the user on output screen as follows:
1. Enter 1 to find Area of a Circle.
2. Enter 2 to find Diagonal of Square.
3. Enter 3 to find Area of a Square.
Find the area of a circle if user enters 1, diagonal of a square if user enters 2,
and area of a square if user enters 3.
Area of a circle = π r2
Diagonal of a square = √𝟐 𝒂, where a is the side of the square
Area of a square = a2 ,where a is the side of the square
*****************