Write a program that computes the square footage of a house given the dimensions of each room.Have the program ask the user how many rooms in the house and then request the dimensions of eachroom. Display the resulting total square footage.

Sagot :

#include

int main () {

printf("Program to calculate the square footage of the house.\n");

int total_rooms;

double length, width;

double total_square_footage = 0.0;

printf("Enter total number of rooms in the house:");

scanf("%d", &total_rooms);

for (int i = 0; i
printf("Enter the lenght and width of room %d: ", i+1);

scanf("%if %if", &lenght, &width);

total_square_footage += lenght*width;

}

printf("Total square footage of the house: %if\n", total_square_footage);

return 0;

}


Please mark it as brainliest answer:).
View image Talanat