having problem changing if else if to do while .

pleas can any one change this codes to "do while" statement thanks..

#include <iostream>
using namespace std;

int main()
{
char choice;
double qty;

cout <<"PIZZA OPTIONS\n";
cout <<"[A] Deluxe\n";
cout <<"[B] Super\n";
cout <<"[C] Super Deluxe\n";

cout <<"Enter your Choice: "; cin >>choice;
cout <<endl <<endl;

if (choice == 'A' || choice == 'a')
{
cout<<"DELUXE PIZZA\n";
cout<<"Ingredient: Ham, Onions, and Cheese\n";
cout<<"Quantity: "; cin>>qty;

cout<<"Total Amount: " <<qty * 65 <<endl;
}

else if (choice == 'B' || choice == 'b')
{
cout<<"SUPER PIZZA\n";
cout<<"Ingredient: Onions, Cheese, Meat and pineapple\n";
cout<<"Quantity: ";
cin>>qty;
cout<<"Total Amount: " <<qty * 80 <<endl;
}

else if (choice == 'C' || choice== 'c')
{
cout<<"SUPER DELUXE PIZZA\n";
cout<<"Ingredient: Ham, Onions, Cheese, Meat and pineapple\n";
cout<<"Quantity: ";
cin>>qty;
cout<<"Total Amount: " <<qty * 95 <<endl;
}

else
cout<<"Chooce A, B or C only!\n";

return 0;
}
I can't, but I can point you to the direction to take a look at:

http://www.cplusplus.com/doc/tutorial/control/
Topic archived. No new replies allowed.