Pages

Tuesday, October 8, 2013

Gross bill code in c++

Pizzarita Pizza House charges 10% Service 4% sales tax on the gross bill of its customers. Make a program that would input the gross bill of the customer and the amount given by the customer to the waiter. Program must output the customer's total bill and his charge.

This will be the output









Here's the code:

# include <iostream>
using namespace std;
int main ()
{
    float a=0, b=0;
    cout<<"Pizarita House"; cout<<endl;
    cout<<"Enter Gross Bill: "; cin>>a;
    cout<<"Service Tax: "; cout<<0.10<<endl;
    cout<<"Sales Tax: "; cout<<0.04<<endl;
    cout<<"Total Bill: "; cout<<a+(a*0.14); cout<<endl;
    cout<<"Amount Bill: "; cin>>b;
    cout<<"Change: "; cout<<b-(a+(a*0.14));
    cout<<endl;
    system ("pause");
}

That's all. Enjoy:)


2 comments: