e code with compilation.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter7: Arrays
Section: Chapter Questions
Problem 4PP: (Numerical) Write and test a function that returns the position of the largest and smallest values...
icon
Related questions
Question

Complete code with compilation. 

 

Q3) 1293)) Q223) sillollowing
circle, siperele circrae etc using sw
#include <stdio.h>
void main()
{int fig_code;
float side, base, length, breadth, height, area, radius;
printf("
--\n");
printf(" 1-> Circle\n");
printf(" 2 --> Rectangle\n");
printf(" 3-> Triangle\n");
printf(" 4-> Square\n");
printf("
--\n");
printf("Enter the Figure code\n");
"-", &);
scanf(".
switch(............)
{ case ........: printf("Enter the radius\n");
..("%...........", &radius);
.............. 3.142 radius radius;
printf("Area of a circle = %.........\n",.
%
----); break;
case: printf("Enter the breadth and length\n");
scanf(".
&breadth, &length);
am
= breadth * length;
("Area of a Reactangle = %f\n", area); break;
case: printf("Enter the base and height\n");
(".
", &base, &......
-);
area=0.5 base height;
printf("Area of a Triangle = %f\n",
-----; break;
case.............: printf("Enter the side\n");
..);
**********
("%f", &
area = side * side;
printf("Area of a Square=\n",
break;
break; }
: printf(".
e areas of different geometrical shapes suc
Transcribed Image Text:Q3) 1293)) Q223) sillollowing circle, siperele circrae etc using sw #include <stdio.h> void main() {int fig_code; float side, base, length, breadth, height, area, radius; printf(" --\n"); printf(" 1-> Circle\n"); printf(" 2 --> Rectangle\n"); printf(" 3-> Triangle\n"); printf(" 4-> Square\n"); printf(" --\n"); printf("Enter the Figure code\n"); "-", &); scanf(". switch(............) { case ........: printf("Enter the radius\n"); ..("%...........", &radius); .............. 3.142 radius radius; printf("Area of a circle = %.........\n",. % ----); break; case: printf("Enter the breadth and length\n"); scanf(". &breadth, &length); am = breadth * length; ("Area of a Reactangle = %f\n", area); break; case: printf("Enter the base and height\n"); (". ", &base, &...... -); area=0.5 base height; printf("Area of a Triangle = %f\n", -----; break; case.............: printf("Enter the side\n"); ..); ********** ("%f", & area = side * side; printf("Area of a Square=\n", break; break; } : printf(". e areas of different geometrical shapes suc
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Concept of pointer parameter
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr