Course Solutions Uncategorized (Solved) : Need Help Coding Created Program Instead Count Floors Backwards Want Count Floors Starting Q26701367 . . . .

(Solved) : Need Help Coding Created Program Instead Count Floors Backwards Want Count Floors Starting Q26701367 . . . .

 

I need help with coding. I created a program, but instead ofhaving it count floors backwards, I want it to count floorsstarting from 1. The code is below:

#include <iostream>

#include <iomanip>

using namespace std;

int main ()

{

const int PERCENTAGE = 100, MISSING_FLOOR = 1;

int hotelFloors = 0, rooms, occupiedRooms,

totalRooms = 0, totalOccupiedRooms = 0, totalUnoccupiedRooms =0;

double percentageOfRoomsOccupied;

  

cout << “How many floors does this hotel contain?n”;

cin >> hotelFloors;

  

if (hotelFloors >= 13)

{

hotelFloors = hotelFloors + MISSING_FLOOR;

}

while (hotelFloors <= 1)

{

cout << “You must enter a value of floors greater than1.”;

cin >> hotelFloors;

}

for (int floorCount = 1; floorCount <= hotelFloors;hotelFloors–)

{

if(hotelFloors == 13)

–hotelFloors;

cout << “What is the number

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post