Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Draw a flowchart or write pseudocode to represent the logic of a program that al

ID: 3561137 • Letter: D

Question

Draw a flowchart or write pseudocode to represent the logic of a program that allows the user to enter values for the width and length of a room's floor in feet. The program outputs the floor in square feet. Modify the program that computes floor area to compute and output the number of 6-inch square tiles needed to tile the floor. Draw a flowchart or write pseudocode to represent the logic of a program that allows the user to enter values for the width and length of a wall in feet. The program outputs the area of the wall in square feet. Modify the program that computes wall area to allow the user to enter the job. (For this exercise, assume that you do not need to account for windows or doors, and that you can purchase partial gallons of paint.) Modify the program that computes paint cost to allow the user to enter the number of doorways that do not have to be painted. Assume that each doorway is 14 square feet. Output the number of gallons needed and the cost of the job. Research current rates of monetary exchange. Draw a flowchart or write pseudocode to represent the logic of a program that allows the user to enter a number of dollars and convert it to Euros and Japanese yen.

Explanation / Answer

Q7)

a)

#include <stdio.h>
int main()
{

float width, length;
printf("enter the values of length and width in feet ");
scanf("%f%f",&length,&width);
   float area;
   area = length * width;

   printf("%.2f",area);
  
}

b)

#include <stdio.h>
int main()
{

float width, length;
printf("enter the values of length and width ");
scanf("%f%f",&length,&width);
   float area;
   area = length * width;

   printf("%.2f",area);
   printf(" ");
int tiles;
tiles = area * 2;
printf("number of tiles is %d ",tiles);
}

Q8)

a)

#include <stdio.h>
int main()
{

float width, length;
printf("enter the values of length and width ");
scanf("%f%f",&length,&width);
   float area;
   area = length * width;

   printf("%.2f",area);

b)

#include <stdio.h>
int main()
{

float width, length;
printf("enter the values of length and width ");
scanf("%f%f",&length,&width);
   float area;
   area = length * width;

   printf("%.2f",area);
   printf(" ");
int gallon_price;
printf("enter the price of gallon ");
scanf("%d",&gallon_price);
float gallon_amount;
gallon_amount = area/350;
float price;
price = gallon_amount * gallon_price;
printf("%.2f,%.2f",gallon_amount,price);

}

c)

#include <stdio.h>
int main()
{

float width, length;
printf("enter the values of length and width ");
scanf("%f%f",&length,&width);
   float area;
   area = length * width;

   printf("%.2f ",area);
   int doorways;
   printf("enter the number of doorways ");
   scanf("%d",&doorways);
int gallon_price;
printf("enter the price of gallon ");
scanf("%d",&gallon_price);
float gallon_amount;
gallon_amount = (area - doorways*14)/350;
float price;
price = gallon_amount * gallon_price;
printf("%.2f,%.2f",gallon_amount,price);

}

Q9)

#include <stdio.h>
int main()
{
int dollars;
printf("enter the number of dollars ");
scanf("%d",&dollars);
float euro;
float jap_yen;
euro = 0.76 * dollars;
jap_yen = 104.08 * dollars;
printf("number of euros in %d dollars is %.2f ",dollars,euro);
printf("number of jap_yen in %d dollars is %f ",dollars,jap_yen);
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote