Solved how to save user input into an array then display it

December 26, 2012 at 02:21:40
Specs: Windows 8 doing a program of choosing food menu in each day. how im suppose to save user choice of day into an array and then display it in another function

See More: how to save user input into an array then display it

Report •

December 26, 2012 at 11:59:56

Report •

December 26, 2012 at 15:22:40
int totalprice1;
int totalcalorie1;
//system("cls");//system clear to new display
if (bmi<=18.5)
cout<<"Suggested Meals:KOREAN RICE BOWL - 430kcal"<<endl;
cout<<" :VEGETARIAN MEXICAN PIZZA - 294kcal"<<endl;
cout<<" :CHOCOLATE SMOOTHIE - 30kcal"<<endl;
cout<<"Total Price :RM 10.50"<<endl;
int total=430+294+30;
cout<<"Total Calorie :"<<total<<"kcal"<<endl;
cout<<"SAVE MENU?:1.YES 2.NO"<<endl;


this is a part of the trying to save the data inside an array program run without problem but i dont know wheather it really save it into an array or not. this part is inside a function menu(). how can i display the SAVEDATA in another function.for example detail()
where did i do wrong..?

Report •

December 29, 2012 at 09:34:32
✔ Best Answer
seems like you could just do an output of the array...perhaps with

printf("%d\n", SAVEDATA[1];

:: mike

Report •

Related Solutions

Ask Question