Guest User

Untitled

a guest
Jan 21st, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. void OutputAvg(int balloonNum, float balloonCost, int giftbagNum, float giftbagCost,
  2. int napkinNum, float napkinCost, int plateNum, float plateCost, int pizzaNum, float pizzaCost,
  3. int juiceboxNum, float juiceboxCost, float cakeCost)
  4. {
  5. ofstream fout;
  6. string filename;
  7.  
  8. cout << "what output file do you want to use?";
  9. cin >> filename;
  10.  
  11. fout.open(filename.c_str( ) );
  12. fout << fixed;
  13. fout << "Balloon Num:\t" << balloonNum << "\nBalloon Cost:\t" << balloonCost << "\nGiftBag Num:\t"
  14. << giftbagNum << "\nGiftBag Cost:\t" << giftbagCost << "\nNapkin num:\t" << napkinNum << "\nNapkin cost:\t"
  15. << napkinCost << "\nPlate num:\t" << plateNum << "\nPlate cost:\t" << plateCost << "\nPizza num:\t" << pizzaNum
  16. << "\nPizza cost:\t" << pizzaCost << "\nJuicebox num:\t" << juiceboxNum << "\nJuicebox cost:\t"
  17. << juiceboxCost << "\nCake cost:\t" << cakeCost;
  18. fout.close();
  19.  
  20. return;
  21.  
  22. }
Add Comment
Please, Sign In to add comment