Admin Admin
Posts : 216 Join date : 2011-06-17 Location : Rawalpindi
| Subject: Sale Tax Calculator in C++ Thu Oct 27, 2011 6:11 am | |
| You are required to write a program for BILLING SYSTEM of a virtual restaurant. The basic idea is that by entering the meal price, your billing system will calculate the Sales Tax, Total amount and Complement offer upon that meal. int main() { int price; cout << "Please enter meal price? "; cin >> price; float saleTax; if(price<=100) { saleTax = 0.0 * price; } else if(price <= 200) { saleTax = 0.1 * price; } else { saleTax = 0.2 * price; } int totalAmount; totalAmount = price + saleTax; cout << "The total price of Meal is = " << totalAmount << endl; getch(); } | |
|