I need to build a structured program that has to deal with pizza size, pounds of cheese, and price of the pizza in C++. I haven't got far because instead of the program actually having the defined variables the user has to put their own variables in.
struct pizza { //declare a structure
int size; //size of the pizza in inches
int cheeseAmount; //amount of cheese in pounds
float price; //price of the pizza
};
int main()
{
pizza pizza1; //define a structure variable
//give values to structre members
pizza1.size =
pizza1.cheeseAmount =
pizza1.price =
//display structure members
cout << " Enter the size of the pizza in inches: " << pizza1.size;
cout << " Enter the pounds of cheese to be added: " << pizza1.cheeseAmount;
cout << " Enter the price of the pizza: " << pizza1.price;
cout << " \n A " << pizza1.size << " inch pizza with " << pizza1.cheeseAmount << " pounds of cheese will cost\n " << pizza1.price ;
Is what I have so far I just need to know what I need to do to get it to work the the correct structure.