Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

03 ) Fill in the blanks at following program that finds the areas of different geometrical shapes su circle, square, rectangle ete using switch statements.

image text in transcribed
03 ) Fill in the blanks at following program that finds the areas of different geometrical shapes su circle, square, rectangle ete using switch statements. ( 25 Pts) #include void main() {int fig_code; float side, base, length, breadth, height, area, radius; printf(" -- "); printf("1 -> Circle "); printf(" 2 --> Rectangle "); printf(" 3 -> Triangle "); printf(" 4 --> Square "); printf("- n"); printf("Enter the Figure code "); scanf(". ...", &......); switch ........) {case......: printf("Enter the radius "); .................("%...........", &radius); ..............= 3.142* radius * radius; printf("Area of a circle = %......... ", ...........); break; case......: printf("Enter the breadth and length "); scanf(".................", &breadth, &length); ................ = breadth * length; ...("Area of a Reactangle = % ", area); break; case ...........: printf("Enter the base and height "); ......... ...., &base, &... area = 0.5 base * height; printf("Area of a Triangle = %f ", . ..;break; case ............: printf("Enter the side "); ..............("%f", &............); area = side * side; printf("Area of a Square......... ", ..... break; ....; "); ... printf"..... ........ break; }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions