#include <iostream>
#include <string>
#include <algorithm>
#include <ctime>
usingnamespace std;
int main() {
bool game;
do {
char choice;
double capacity, present, percent_used, remove, remaining_space;
cout << "Would you like to use the capacity calculator (y,n)?" << endl;
cin >> choice;
if (choice == 'y') {
cout << "How many people can be allowed in your room" << endl;
cin >> capacity;
cout << "How many people are currently in the room" << endl;
cin >> present;
if (present > capacity) {
cout << "You have too many people in the room at this time " << endl;
remove = present - capacity;
cout << "You need to remove " << remove << " people in order to be at capacity" << endl;
}
elseif (capacity > present) {
cout << "You have a safe amount of people in this room" << endl;
percent_used = (present / capacity) * 100;
cout << "You are only using " << percent_used << "% " << "of the rooms capacity" << endl;
}
}
elseif (choice == 'n') {
cout << "Have a nice day" << endl;
game = false;
}
} while (game=true);
system("pause");
return 0;
}