Question

I seem to be missing some info when I run the program. I few more
key points need to be added to the program when ran. Please help
Write a program that calculates the occupancy rate of the 120
suites (20 per floor) located on the top 6 floors of a 15-story
luxury hotel. These floors are 10-12 and 14-16 because, like many
hotels, there is no 13th floor. Solve the problem by using a single
loop that loops once for each floor between 10 and 16 and, on each
iteration, asks the user to input the number of suites occupied on
that floor. Note that when it is on the iteration for floor 13, no
input should be taken. After all the iterations, the program should
display how many suites the hotel has, how many of them are
occupied, and what percentage of them are occupied. #includeint
main() { int floors = 6, rooms = 20, suites = 120, occupied = 0,
totalRooms = 120, totalOccupied = 0, totalUnoccupied = 0,
numFloors=16; int occupRate,floor; //store hotel occupancy rate for
(floor = 10; floor <= numFloors; floor++)//initiate loop { if
(floor==13) { floor=14; } printf("Enter the number of rooms
occupied on " ); printf("%d",floor); printf( "floor.\n");
printf("occupied:"); printf("%d",occupied); while(occupied>20 |
occupied<0) { printf("Invalid Entry\n"); printf("Enter the
number of rooms occupied on "); printf("%d",floor);
printf("floor.\n"); printf("occupied:"); printf("%d",occupied); }
totalOccupied += occupied; //number of rooms in each floor will be
added to totalRooms totalUnoccupied = totalRooms - totalOccupied;
//store total of unoccupied rooms in hotel }
occupRate=(totalOccupied*100)/totalRooms;//store occupancy rate
printf("\n\nThe hotel has "); printf("%d",totalRooms); printf("
rooms.\n"); printf("%d",totalOccupied); printf( " rooms are
occupied\n"); printf("%d",totalUnoccupied ); printf( " rooms are
unoccupied\n"); printf("%d",occupRate); printf("% of the rooms are
occupied\n\n"); //display occupancy rate in percentage format
return 0; }