Question: For C + + , I have the same example as mentioned above, but I am unable to ge the formula. Here is what i

For C++, I have the same example as mentioned above, but I am unable to ge the formula. Here is what i have so far. If anyone could assist, I would appreciate it.
#include
#include
#include
using namespace std;
int main(){
int numPeople =20;
int numPizzas =4;
double totalCost =14.95;
cin >> numPeople;
cin >> numPizzas;
cin >> totalCost;
cout "People: " numPeople endl;
cout "Pizza(s)" "needed: " ceil(3.33) endl;
cout fixed setprecision(2);
cout "Cost for ""4" "pizza(s): ""$"(numPeople *2)* totalCost /10 endl;
return 0;
}
For C + + , I have the same example as mentioned

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!