#include <iostream>
#define _USE_MATH_DEFINES
#include <cmath>
using namespace std;
int main()
{
const double PI = M_PI;
const double SLICE_SIZE = 14.125;
// and the "slices per guest" defined constant
const int SLICES_PER_GUEST = 2;
// 1. Input, the number of party guests and the size pizza to buy
cout << "Enter the number of guests expected (eg, 8): ";
int guests;
cin >> guests;
cout << "Enter the pizza size to buy (eg, 14): ";
double diameter;
cin >> diameter;
// 2. Calculate the estimate of "pizzas to buy for a party"
//
//--- Pseudocode to calculate the Total Area of pizza needed for party ----
// a. let's first calculate the total area of pizza needed for the party guests.
//
// First declare a floating-point variable to hold the total_area
// Then assign to this total_area variable, the calculated value below:
float TOTAL_AREA = (guests)*(SLICES_PER_GUEST)*(SLICE_SIZE);
//
// b. calculate the pizza_area of a circular pizza of the given diameter
double PIZZA_AREA = M_PI * diameter / 2;
// c. next, calculate the floating-point ratio: total_area/pizza_area
cout << TOTAL_AREA/PIZZA_AREA;
//
// d. finally, find the ceil() of the above ratio. This will be the
// recommended whole number of pizzas to buy for the party (an integer).
cout << "ceil(1.7) = " << ceil(1.7) << endl;
cout << "ceil(1.2) = " << ceil(1.2) << endl;
return 0;
}
PIZZA_AREA not declared but its in there?