File Edit Search View Project Execute Tools AStyle Window Help 口回■国电|昌 TOH-GcC 4.9.2 64-bis Release (giobals) Project Cla D ITEFinalProject.cpp O Project include include iostream using namespace std; int main() 10 11 int choice; //declare variables 12 13 int payment; string input3- "y" double que double total-e string input -"y"; //default input is yes string input2, input3, inputa; double array [7j-(1.5, 1.25,2.25,2.5,2.25,2.75,2.5,1,1.25, 1.25, 0,75, 1, 0.75); // declare array string arrayl (71-("regular coffee ($1.50)", "decaf coffee ($1.25)", "Americano (2.25)", "Latte ($2.se)", "Espresso (2.25)", "Cappuccino ($2.75)", "Hacchiato ($2.50)","Plain Muffin ($1.00)", "Raspberry Muffin ($1.25)", "Scone (s0.75)", "Bluebe string array2 ?]-{"Buy", "Check", "Add crad", "add card load", "Exit"}; ; 15 16 17 18 19 20 21 while (input-"Y" || input--"y"){ // while Loop when inputay cout « ******"Welcome**** « endl; //menu display cout "welcome! Here is the Cafe Menu:"<< endl; cout c<***Coffee** 22 23 24 25 26 **Cost($)** cout "1) Regular cout c"2) Decaf cout "3) Americano cout "4) Latte cout ce "5) Espresso cout <« "6) Cappuccino cout e "7) Macchiato "> choice; cout ce "how many would you like?:" ccendl; cin >> q //quantity cout "Would you like anything else?(Y/N):"> input; total- (q"array[choice-1])+total; if(input-"N" ||Input-="n") 34 35 36 37 38 39 40 cout<<"Are you satisfied with your order?(Y/N)"»input2; if (input2--"y")( 41 42 43 44 cout « "Thank you! Have a nice day!"

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Please help me with this one

Project1 - [Project Finals.dev] - Dev-C++ 5.11
File Edit Search
View Project Execute
Tools AStyle Window Help
TDM-GCC 4.9.2 64-bit Release
(globals)
Project Cla
ITEFinalProject.cpp
EO Project1
#include <string>
1
2
#include <iostream>
using namespace std;
int main()
8
{
10
11
int choice; //declare variables
int payment;
string input3= "Y"
double q-0;
double total=@;
string input ="Y"; //default input is yes
string input2, input3, input4;
double array [7]={1.5, 1.25,2.25,2.5,2.25,2.75,2.5,1,1.25, 1.25, 0.75, 1, 0.75}; // declare array
string array1 [7]={"regular coffee ($1.50)", "decaf coffee ($1.25)", "Americano (2.25)", "Latte ($2.50)", "Espresso (2.25)", "Cappuccino ($2.75)", "Macchiato ($2.50)","Plain Muffin ($1.00)", "Raspberry Muffin ($1.25)", "Scone ($0.75)", "Bluebe
string array2 [7]={"Buy", "Check", "Add crad", "add card load", "Exit"};
12
13
*4
15
16
17
18
19
20
21
while (input=="Y" || input=="y"){ // while loop when input=y
cout <« "******Welcome******" << endl; //menu display
cout <<"Welcome! Here is the Cafe Menu:"< endl;
22
**Cost($)**
cout <«"**Coffee**
cout <«"1) Regular
cout <<"2) Decaf
cout <<"3) Americano
cout <<"4) Latte
cout <« "5) Espresso
cout <«< "6) Cappuccino
cout <« "7) Macchiato
cout <<"what would you like? (1-7):" <<endl;
cin >> choice;
cout <« "how many would you like?:" <endl;
cin > q; //quantity
cout <«"Would you like anything else?(Y/N):"<<endl;
cin >> input;
total= (q*array[choice-1])+total;
if(input=="N" ||input=="n"){
";
<endl;
<<endl;
<<endl;
" <<endl;
1.50
1.25
2.25
2.50
30
2.25
<<endl;
2.75
<<endl;
2.50"<<endl;
34
35
36
37
38
39
40
cout<<"Are you satisfied with your order? (Y/N)"<<endl;
cin >>input2;
if (input2=="Y"){
cout <« "Thank you! Have a nice day!"<endl;
41
43
44
45
Transcribed Image Text:Project1 - [Project Finals.dev] - Dev-C++ 5.11 File Edit Search View Project Execute Tools AStyle Window Help TDM-GCC 4.9.2 64-bit Release (globals) Project Cla ITEFinalProject.cpp EO Project1 #include <string> 1 2 #include <iostream> using namespace std; int main() 8 { 10 11 int choice; //declare variables int payment; string input3= "Y" double q-0; double total=@; string input ="Y"; //default input is yes string input2, input3, input4; double array [7]={1.5, 1.25,2.25,2.5,2.25,2.75,2.5,1,1.25, 1.25, 0.75, 1, 0.75}; // declare array string array1 [7]={"regular coffee ($1.50)", "decaf coffee ($1.25)", "Americano (2.25)", "Latte ($2.50)", "Espresso (2.25)", "Cappuccino ($2.75)", "Macchiato ($2.50)","Plain Muffin ($1.00)", "Raspberry Muffin ($1.25)", "Scone ($0.75)", "Bluebe string array2 [7]={"Buy", "Check", "Add crad", "add card load", "Exit"}; 12 13 *4 15 16 17 18 19 20 21 while (input=="Y" || input=="y"){ // while loop when input=y cout <« "******Welcome******" << endl; //menu display cout <<"Welcome! Here is the Cafe Menu:"< endl; 22 **Cost($)** cout <«"**Coffee** cout <«"1) Regular cout <<"2) Decaf cout <<"3) Americano cout <<"4) Latte cout <« "5) Espresso cout <«< "6) Cappuccino cout <« "7) Macchiato cout <<"what would you like? (1-7):" <<endl; cin >> choice; cout <« "how many would you like?:" <endl; cin > q; //quantity cout <«"Would you like anything else?(Y/N):"<<endl; cin >> input; total= (q*array[choice-1])+total; if(input=="N" ||input=="n"){ "; <endl; <<endl; <<endl; " <<endl; 1.50 1.25 2.25 2.50 30 2.25 <<endl; 2.75 <<endl; 2.50"<<endl; 34 35 36 37 38 39 40 cout<<"Are you satisfied with your order? (Y/N)"<<endl; cin >>input2; if (input2=="Y"){ cout <« "Thank you! Have a nice day!"<endl; 41 43 44 45
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
File Input and Output Operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education