axyd icon

CS172 l1ex8

axyd | PRO | 02/11/16 02:21:40 PM UTC | 0 ⭐ | 788 👁️ | Never ⏰ | []
C++ |

610 B

|

None

|

0 👍

/

0 👎

#include <iostream>
using namespace std;
 
int main()
{
     double i1 = 15.95, i2 = 24.95, i3 = 6.95, i4 = 12.95, i5 = 3.95,
        subt = i1 + i2 + i3 + i4 + i5,
        aftertax = subt*0.07,
        total = subt + aftertax;
     cout << "####Lab 2, Exercise 8####\n\n";
     cout << "Item 1 costs: $" << i1 << endl;
     cout << "Item 2 costs: $" << i2 << endl;
     cout << "Item 3 costs: $" << i3 << endl;
     cout << "Item 4 costs: $" << i4 << endl;
     cout << "Item 5 costs: $" << i5 << endl << endl;
     cout << "Your subtotal is: $" << subt << ", taxes due: $" << aftertax << ", and your total is: " << total << endl;
     cin.get();
}

Comments