. Create a flowchart for he C++ program below: include sing namespace std; nt main() int menucode, noeforder; string name; double amount, balance, totalprice = 0, count = 0, totaltransaction 0; %3D sout << "\n\n\t\t\sunlight food"; Sout << "\n\t\t----- sout << "\n\&IXBRS of food Sout << "\n\tfride rice Price(RM)"; 5.40"; Eeed code

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
100%
1. Create a flowchart for
the C++ program below:
#include<iostream>
using namespace std;
int main()
{
int menu.code, naeforder;
string name;
double amount, balance, totalprice = 0, count = 0, totaltransaction = 0, nooftran
= 0;
Sout, << "\n\n\t\t\sunlight food";
Sout << "\n\t\t-
SQut << "\n\tTxpes of food
SQut << "\n\tfride rice
Sout <« "\n\tnoodle
SQut << "\n\tcurry
Eged code
1
Price(RM)";
5.40";
2.90";
3.90";
2
3
sout << "\n\n\nEnter menu code: ";
sin > menucode;
do
{
cout << "Enter number of orders: ":
sin > nooforder;
if (menu.code == 1)
{
tatalprice = noeforder * 15.40;
name = "fried rice";
}
if (menucode == 2)
{
tatalprice = noofarder * 20.90;
name = "noodle";
}
if (menu.code == 3)
{
tatalprice = noeforder * 35.80;
name = "curry";
}
cout << "Enter payment amount: RM ";
sin > amount;
balance = amount -
tetalprice;
sout << "\n\n\t\tswalight food" << endl;
Sout << "\t\t-
Cout << " Food Code
Sout << " Type of food
cout << " No. of Order
SQut << " Total (RM)
Sout << " Cash (RM)
cout << " Balance (RM):" « balance << endl;
cout << "\n\atbank you. Please come again!"
tataltransactien = tetaltransaction + ttalprice;
Dooftran = pooftran + 13;
cout « "\n\nDo you want to continue? If NO enter food code -1";
Sout << "\n\DEnter food code: ";
sin > menucode;
\n\n";
< menu.code « endli
" << name << endl;
" « nooforder << endl;
<< tetalprice << endl;
<< amount << endl;
« endl;
} while (menusede l= -1);
Sout << "\aetal no. of transactions: "
cout << "Total transaction amount: RM "
« nooftran < endl;
« totaltransaction << end « endl;
}
Transcribed Image Text:1. Create a flowchart for the C++ program below: #include<iostream> using namespace std; int main() { int menu.code, naeforder; string name; double amount, balance, totalprice = 0, count = 0, totaltransaction = 0, nooftran = 0; Sout, << "\n\n\t\t\sunlight food"; Sout << "\n\t\t- SQut << "\n\tTxpes of food SQut << "\n\tfride rice Sout <« "\n\tnoodle SQut << "\n\tcurry Eged code 1 Price(RM)"; 5.40"; 2.90"; 3.90"; 2 3 sout << "\n\n\nEnter menu code: "; sin > menucode; do { cout << "Enter number of orders: ": sin > nooforder; if (menu.code == 1) { tatalprice = noeforder * 15.40; name = "fried rice"; } if (menucode == 2) { tatalprice = noofarder * 20.90; name = "noodle"; } if (menu.code == 3) { tatalprice = noeforder * 35.80; name = "curry"; } cout << "Enter payment amount: RM "; sin > amount; balance = amount - tetalprice; sout << "\n\n\t\tswalight food" << endl; Sout << "\t\t- Cout << " Food Code Sout << " Type of food cout << " No. of Order SQut << " Total (RM) Sout << " Cash (RM) cout << " Balance (RM):" « balance << endl; cout << "\n\atbank you. Please come again!" tataltransactien = tetaltransaction + ttalprice; Dooftran = pooftran + 13; cout « "\n\nDo you want to continue? If NO enter food code -1"; Sout << "\n\DEnter food code: "; sin > menucode; \n\n"; < menu.code « endli " << name << endl; " « nooforder << endl; << tetalprice << endl; << amount << endl; « endl; } while (menusede l= -1); Sout << "\aetal no. of transactions: " cout << "Total transaction amount: RM " « nooftran < endl; « totaltransaction << end « endl; }
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Introduction to Coding
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