where and how do I add array statement and ofstream?
#include <iostream>
using namespace std;
int main(int argc, char** argv)
{
int size, crust, flavor, extra, order=0, total=0;
cout<<"Good day! Welcome to Don Rogelio's Pizza. \n";
do{
cout<<"\nPizza size: (1)Small (2)Medium (3)Large :";
cin>>size;
cout<<"\nPizza Crust: (1)Thin Crust (2)Regular Crust :";
cin>>crust;
cout<<"\nPizza Flavor: (1)Hawaiian (2)Pepperoni (3)Ham & Cheese (4)All Meat (5)All Cheese (6)Vegetarian :";
cin>>flavor;
cout<<"\nAdditional/Extras: (1)Pepperoni (2)Pineapple (3)Ham (4)Veggies (5)Meat (6)Cheese (7)None :";
cin>>extra;
switch(size)
{
case 1: cout<<"Your order is small";
total=total+30; break;
case 2: cout<<"Your order is medium";
total=total+50; break;
case 3: cout<<"Your order is large";
total=total+70; break;
default: cout<<"Invalid input."; break;
}
switch(crust)
{
case 1: cout<<" thin crust";
total=total+35; break;
case 2: cout<<" regular crust ";
total=total+30; break;
default: cout<<"\nInvalid input."; break;
}
switch(flavor)
{
case 1: cout<<" hawaiian pizza"; total=total+50; break;
case 2: cout<<" pepperoni pizza"; total=total+65; break;
case 3: cout<<" ham & cheese pizza"; total=total+50; break;
case 4: cout<<" all meat pizza"; total=total+80; break;
case 5: cout<<" all cheese pizza"; total=total+50; break;
case 6: cout<<" vegetarian pizza"; total=total+60; break;
default: cout<<"\nInvalid input."; break;
}
switch(extra)
{
case 1: cout<<" with extra pepperoni.\n"; total=total+10; break;
case 2: cout<<" with extra pineapple.\n"; total=total+15; break;
case 3: cout<<" with extra ham.\n"; total=total+10; break;
case 4: cout<<" with extra veggies.\n"; total=total+15; break;
case 5: cout<<" with extra meat.\n"; total=total+20; break;
case 6: cout<<" with extra cheese.\n"; total=total+15; break;
case 7: cout<<" with no extra.\n"; break;
default: cout<<"\nInvalid input."; break;
}
cout<<"Would you like to change your order? (1)YES (2)NO: ";
cin>>order;
switch(order)
{
case 1: order=order +0; break;
case 2: order=order +1; break;
}
}
while(order==1);
{
cout<<"\n";
cout<<"\nThe total is " <<total;
cout<<" PHP.";
}return 0;
}