Banner Ad

    A    L    W    A    Y    S           D    E    S    I    R    E           T    O           L    E    A    R    N           S    O    M    E    T    H    I    N    G           U    S    E    F    U    L   

Monday, May 9, 2011

2010 Final IPE_UNIXC-1151a question 1

#include <iostream>
using namespace std;
int main()
{
        int mt;
      char ask;
      cout<<"Do you want to continue y or n  ";
        cin>>ask;

       
        while(ask=='y' || ask=='Y' )
        {

      cout<<"Enter your Menu type  :";
      cin>>mt;
      if(mt==1)
      {
      cout<<"Your total cost is =  "<<(150+250+320)*95/100<<endl;
      }
      else if(mt==2)
      {
      cout<<"your total cost is =  "<<(170+280+360)*93/100<<endl;
      }
      else if(mt==3)
        {
        cout<<"your total cost is =  "<<(200+350+400)*91/100<<endl;
      }
      else if(mt==4)
        {
        cout<<"your total cost is =  "<<(250+380+450)*90/100<<endl;
      }

      else
      {
      cout<<"invalid Menu type "<<endl;
      }
        cout<<"Do you want to continue y or n :  ";
      cin>>ask;
      }

        return 0;

}



                              
 

0 comments:

Related Posts Plugin for WordPress, Blogger...

your comments