Question: Create the following program in C in Visual Studio Create an interactive program that will calculate the perimeter and area of a square and also
Create the following program in C in Visual Studio
Create an interactive program that will calculate the perimeter and area of a square and also calculate the circumference and area of a circle.
// use integers for the radius and side length
// use integers for the square area and square perimeter // use doubles for the circle area and circle circumference
Declare variables: radius, length, squareArea, squarePerimeter, circleArea, circleCir
Greet the user
Prompt for the radius
Get the radius from the keyboard.
Calculate the area of the circle (use 3.141592)
Display the area of the circle onto the screen to 3 decimal places
Calculate the circumference of the circle (use 3.141592)
Display the circumference of the circle onto the screen to 3 decimal places
Prompt for the side length of the square
Get the length from the keyboard.
Calculate the area of the square
Display the area of the square onto the screen
Calculate the perimeter of the square
Display the perimeter of the square onto the screen
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
