Using while or do-while. Make a program that will input Sales, process the Value Added Tax deduction as follows:
 Sales
VAT
Less than equal =10000.00
10%
Above 10000.00
15 %
Display the taxable amount, Your program will be terminated if you input zero in the sales.
#include <iostream>
using namespace std;
int main() {
double sales;
do {
cout << "Enter sales:";
cin >> sales;
if (sales <= 10000.0)
cout << "tax:" << 0.10 * sales << endl;
else
cout << "tax:" << 0.15 * sales << endl;
} while (sales)
return 0;
}
Comments
Leave a comment