I need my loop to iterate once for each floor, skipping the entire thirteenth iteration, but I'm not sure how. Any help woul dbe very much appreciated.
Code:#include <iostream> #include <iomanip> using namespace std; int main() { int floors; int total = 0; int number; float mean; cout << "How many floors does the hotel have? " << endl; cin >> floors; if (floors >= 1) { for (number = 1; number <= floors; number ++) { total = total + number; } mean = float(total)/floors; cout << "The percentage of rooms occupied is " << mean << endl; } else if (floors == 13 || floors < 1) cout << "Invalid input" << endl; return 0; }