thenuke321

Untitled

Sep 2nd, 2015
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.43 KB | None | 0 0
  1. void discount ()
  2. {
  3.     float totalBill(0);
  4.     float finalBill(0);
  5.     float disCount(0);
  6.     float div(0.1);
  7.     cout << "Please enter the total bill" << endl;
  8.     cin >> totalBill;
  9.     if(totalBill >= 50)
  10.     {
  11.         disCount = div * totalBill;
  12.     }
  13.     else if(totalBill > 50)
  14.     {
  15.         disCount = 0;
  16.     }
  17.     finalBill = totalBill - disCount;
  18.     cout << "The Total Bill " << totalBill << " The Discount " << disCount << " The Final Bill " << finalBill << endl;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment