-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathassignment3.cpp
More file actions
33 lines (24 loc) · 897 Bytes
/
assignment3.cpp
File metadata and controls
33 lines (24 loc) · 897 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
//Syeda Umm E Abiha Rizvi
//SE-21014
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
int totalSales;
float stateTax, localTax;
float stateTaxPer, localTaxPer;
cout << setprecision(2) << fixed << showpoint;
cout << "Please input the total sales for the month \n";
cin >> totalSales;
cout << "Please input the state tax percentage in decimal form (.02 for 2%) \n";
cin >> stateTax;
cout << "Please input the local tax percentage in decimal form (.02 for 2%) \n";
cin >> localTax;
stateTaxPer = stateTax * totalSales;
localTaxPer = localTax * totalSales;
cout << "The total sales for the month is $" << totalSales << endl;
cout << "The state tax for the month is $" << stateTaxPer << endl;
cout << "The local tax for the month is $" << localTaxPer << endl;
return 0;
}