As a form of quality control, the Pancake Kitchen has recorded, on a Pancake file, two measurements for each of its pancakes made in a certain month: the thickness in mm (millimetres) and the diameter in cm (centimetres). Each record on the file contains two measurements for a pancake, thickness followed by diameter.Â
Write a complete C++ programÂ
a) that will prompt the number of the pancake produce per day, the thickness in mm (millimetres) and the diameter in cm (centimetres) of each pancake,
b)Â to identify and display minimum and maximum for both dimensions,
c) to calculate and display the average for both the dimensions
Here is program:
int main()
{
int thickness;
int diameter;
cout << "Enter thickness in mm (millimetres):" << endl;
cin >> thickness;
cout << "Enter diameter in cm (centimetres):" << endl;
cin >> diameter;
cout << "Average for both the dimensions: " << ((thickness * 10 )+ diameter) / 2 << endl;
}
Comments
Leave a comment