Advertisement
axyd

CS172 l1ex8

Feb 11th, 2016
340
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.61 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6.      double i1 = 15.95, i2 = 24.95, i3 = 6.95, i4 = 12.95, i5 = 3.95,
  7.         subt = i1 + i2 + i3 + i4 + i5,
  8.         aftertax = subt*0.07,
  9.         total = subt + aftertax;
  10.      cout << "####Lab 2, Exercise 8####\n\n";
  11.      cout << "Item 1 costs: $" << i1 << endl;
  12.      cout << "Item 2 costs: $" << i2 << endl;
  13.      cout << "Item 3 costs: $" << i3 << endl;
  14.      cout << "Item 4 costs: $" << i4 << endl;
  15.      cout << "Item 5 costs: $" << i5 << endl << endl;
  16.      cout << "Your subtotal is: $" << subt << ", taxes due: $" << aftertax << ", and your total is: " << total << endl;
  17.      cin.get();
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement