Question: Hi, can you help me please in creating a flow chart and algorithm of the C Language Program Code below. And also, what do you
Hi, can you help me please in creating a flow chart and algorithm of the C Language Program Code below. And also, what do you think is the possible enhancement of the project? Thank you so much for your assistance. I appreciate you for doing your best works to help.
****************************************************
#include
int main() { int a,b,c.choice;
while (1) { printf(" Please select an option: \t1. Area of Square \t2. Area of Rectangle \t3. Volume of Cube \t4. Volume of Cuboid \t5. Exit Enter your Choice: "); scanf("%d",&choice);
if (choice==1) { printf(" Enter length: "); scanf("%d",&a); printf(" Area is %d",a*a); } else if (choice==2) { printf(" Enter length and width: "); scanf("%d",&a); scanf("%d",&b); printf(" Area is %d",a*b); } else if (choice==3) { printf(" Enter length: "); printf(" Volume is %d",a*a*a); scanf("%d",&a); } else if (choice==4) { printf(" Enter length, width and height: "); scanf("%d",&a); scanf("%d",&b); scanf("%d",&c); printf(" Volume is %d",a*b*c); } else if (choice==5) { printf(" Thank you for using our service... "); exit(0); } else { printf(" Please enter a valid choice... "); } } }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
