This is a basic program, it is all by using integers and float but my question i
ID: 3876487 • Letter: T
Question
This is a basic program, it is all by using integers and float but my question is that I do not know how to do it so far how should I begin with it. Also, how can I deal with the radius of the program?
Is is C program
Consider a problem where a fast food restaurant MicDolly has asked a tile contractor to visit their restaurant and provide an estimate of how much it will cost to lay tile. The restaurant is a L by M rectangular room. The restaurant has six booths (arch like figure), a beverage stand (isosceles traingle) and a restaurant counter (rectangle). Tile needs to be laid throughout the restaurant except where there is booth, beverage stand or a restaurant counter See attached diagram for the description of the restaurant You are to write a program that (assume all dimensions are floating point values) 1. Prompts the user to enter the tile price (which is Sper s 2. You are to prompt the user to enter the dimensions of restaurant L and M 3. You are to prompt the user to enter the dimensions of restaurant counter a and b 4. You are to compute the area of restaurant counter 5. You are to prompt the user to enter the radius of the booth rl 6. You are to compute the area of all six booths You are to prompt the user to enter the length of the beverage stand x You are to compute the area of the beverage stand You are to compute the area of the restaurant that needs to be tiled 7. 10. You are to compute the area of the restaurant that needs to be tiled 11. You are to compute the total cost of the tile and output the result in a formatted manner 3 531 Words English (US)Explanation / Answer
#include <stdio.h>
#include <math.h>
int main(void) {
// your code goes here
float tipri,radius,bev,height;
float length,breath,a,b,areaofcounter,totrad,totrest,totbev;
float tilestoal = 0,totalcost = 0;
printf("enter the tile price per square feet");
scanf("%f",&tipri);
printf(" enter the dimension o restaurent L and M");
scanf("%f%f",&length,&breath);
totrest = length*breath;
printf(" enter the dimension of the counter a and b");
scanf("%f%f",&a,&b);
areaofcounter = a*b;
printf(" enter the radius of booth r1");
scanf("%f",&radius);
totrad = radius/2*radius;
totrad = totrad - radius/2;
totrad = 6*totrad;
printf(" enter the length of beverage");
scanf("%f",&bev);
height = bev*bev;
height = height - (height*height)/4;
float j=height;
for(int i=1;i<=height*2;i++)
{
j=j+(height/j)/2;
}
totbev = (bev * j)/2;
tilestoal = totrest - (areaofcounter + totrad + totbev);
printf(" total area is %f",tilestoal);
totalcost = tilestoal * tipri;
printf(" total cost is %f",totalcost);
return 0;
}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.