#include // This is needed to manipulate the IO. #include using namespace std; int main() { const int slices=8; int people=0; int per_person=0; cout << "How many people? "; cin >> people; if(people>0){ per_person=slices/people; cout << per_person << " slices per person." << endl; } else { cout << "Invalid number of people.\a" << endl; } return 0; }