#include <iostream>
#include <iomanip> // For std::setprecision
#include <cmath> // For std::M_PI
int main() {
// --- Step A: Ask the user for the diameter of the pizza ---
double diameter;
std::cout << "Enter the diameter of the pizza in inches: ";
std::cin >> diameter;
// --- Constants and Intermediate Calculations ---
const double AREA_PER_SLICE = 14.125; // Area for each slice in square inches [1]
const double PI = M_PI; // Use the more precise value of PI from cmath [2]
double radius = diameter / 2.0; // Calculate the radius from the diameter [2]
double pizzaArea = PI * radius * radius; // Calculate the total pizza area [2]
// --- Step B: Calculate the number of slices ---
// Divide the total pizza area by the area of one slice [1]
double numberOfSlices = pizzaArea / AREA_PER_SLICE;
// --- Step C: Display the number of slices ---
// Use static_cast to convert to an integer (whole number of slices) [2]
// Use std::fixed and std::setprecision to control output format [2]
std::cout << "The " << diameter << "-inch pizza can be cut into "
<< static_cast<int>(numberOfSlices) << " slices." << std::endl;
return 0;
}