Kanjut SHELL
Server IP : 172.16.15.8  /  Your IP : 18.216.42.225
Web Server : Apache
System : Linux zeus.vwu.edu 4.18.0-553.27.1.el8_10.x86_64 #1 SMP Wed Nov 6 14:29:02 UTC 2024 x86_64
User : apache ( 48)
PHP Version : 7.2.24
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0705) :  /home/akshoop/../cchansen/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //home/akshoop/../cchansen/stand.cpp
// Concession Stand Test Corrections
// Written by Caitlin Hansen
// -------------------------------------

#include <iostream>
#include <iomanip>
using namespace std;

int main ( )
{

// List Variables

  int i, drcost, hdcost, hamcost, numsold;

// Display Output Headlines

cout << "\n\n             Concession Stand Sales               " << endl;
cout << "---------------------------------------------------" << endl;
cout << "\n Numsold   DrinkCost   HotDogCost   HamburgerCost" << endl;
cout << endl;

// For loop calculating correct prices up to numsold = 10

for (i = 1; i <= 10; i ++)
 {
   numsold = i;
   drcost = i * 2;
   hdcost = i * 3;
   hamcost = i * 5;

 // Display Resulting numbers and prices

   cout << " " << setw(4) << i << " " << setw(9) <<drcost;
   cout << " " << setw(13) <<hdcost << " " << setw(15) << hamcost << endl;
 }

cout << "\n";

return 0;

}

Stv3n404 - 2023