Explain in English sentences what the following C++ given below will do: In your explanation state what each step of the algorithm in the C++ program is performing. For example, make English statements that state facts such as: The #include statement is using the iostream library so that cout and cin can be used in the program. It's basically asking to add comments to the program.

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
Explain in English sentences what the following C++ given below will do: In your explanation state what each step of the algorithm in the C++ program is performing. For example, make English statements that state facts such as: The #include statement is using the iostream library so that cout and cin can be used in the program. It's basically asking to add comments to the program.
8:10
◄ Search
}
(
(
else
}
}
else
(
return 0;
Mobile View
}
}
else
(
{
if (vegan "yes")
(
(
if (gluten free
}
cout<<"
cout << "
cout<<"
cout<<"
}
(
code1
gluten free "no"!
if (gluten free--"yes")
(
else
Main Street Pizza Company\n";
Corner Cafe\n";
Mana's Fine Italian\n";
The Chef's Kitchen\n";
cout <<Corner Cafe\n";
cout << The Chef's Kitchen\n";
"yes" ||
cout <<
cout <<
cout <<
cout <<
cout <<
cout << " Main Street Pizza Company\n";
cout <<Corner Cafe\n";
cout<<"
"
The Chef's Kitchen\n";
Joe's Gourmet Burgers\n";
Main Street Pizza Company\n";
Corner Cafe\n";
Mama's Fine Italian\n";
The Chef's Kitchen\n";
cout << "\nError. \"yes\" or \"no\" must be chosen. \n"
<< "Rerun the program and try again."
<< endl;
cout << "\nError. \"yes\" or \"no\" must be chosen. \n"
<< "Rerun the program and try again."
<< endl;
cout << "\nError. \"yes\" or \"no\" must be chosen.\n"
<< "Rerun the program and try again."
<< endl;
AD
Read Aloud
а в
Headings
Transcribed Image Text:8:10 ◄ Search } ( ( else } } else ( return 0; Mobile View } } else ( { if (vegan "yes") ( ( if (gluten free } cout<<" cout << " cout<<" cout<<" } ( code1 gluten free "no"! if (gluten free--"yes") ( else Main Street Pizza Company\n"; Corner Cafe\n"; Mana's Fine Italian\n"; The Chef's Kitchen\n"; cout <<Corner Cafe\n"; cout << The Chef's Kitchen\n"; "yes" || cout << cout << cout << cout << cout << cout << " Main Street Pizza Company\n"; cout <<Corner Cafe\n"; cout<<" " The Chef's Kitchen\n"; Joe's Gourmet Burgers\n"; Main Street Pizza Company\n"; Corner Cafe\n"; Mama's Fine Italian\n"; The Chef's Kitchen\n"; cout << "\nError. \"yes\" or \"no\" must be chosen. \n" << "Rerun the program and try again." << endl; cout << "\nError. \"yes\" or \"no\" must be chosen. \n" << "Rerun the program and try again." << endl; cout << "\nError. \"yes\" or \"no\" must be chosen.\n" << "Rerun the program and try again." << endl; AD Read Aloud а в Headings
8:09
◄ Search
#include <iostream>
using namespace std;
int main()
string vegetarian,
vegan,
gluten free;
cout << "Is anyone in your party a vegetarian? ";
cin >> vegetarian;
if (vegetarian == "yes" || vegetarian == "no")
cout << "Is anyone in your party a vegan? ";
cin >> vegan;
if (vegan="yes" || vegan= "no")
cout << "Is anyone in your party a gluten-free? ";
cin >> gluten free;
if (gluten free == "yes" || gluten free == "no")
{
cout << "\nHere are your restaurant choices:"
<< endl;
if(vegetarian == "yes")
if(vegan "yes")
{
if(gluten free == "yes" ||
gluten free "no")
{
}
code1
else
cout << "
cout << "
Mobile View
if(gluten free == "yes")
(
cout << "
coute "
cout << "
Corner Cafe\n";
The Chef's Kitchen\n";
Main Street Pizza Company\n";
Corner Cafe\n";
The Chef's Kitchen\n";
Read Aloud
Ő
Headings
Transcribed Image Text:8:09 ◄ Search #include <iostream> using namespace std; int main() string vegetarian, vegan, gluten free; cout << "Is anyone in your party a vegetarian? "; cin >> vegetarian; if (vegetarian == "yes" || vegetarian == "no") cout << "Is anyone in your party a vegan? "; cin >> vegan; if (vegan="yes" || vegan= "no") cout << "Is anyone in your party a gluten-free? "; cin >> gluten free; if (gluten free == "yes" || gluten free == "no") { cout << "\nHere are your restaurant choices:" << endl; if(vegetarian == "yes") if(vegan "yes") { if(gluten free == "yes" || gluten free "no") { } code1 else cout << " cout << " Mobile View if(gluten free == "yes") ( cout << " coute " cout << " Corner Cafe\n"; The Chef's Kitchen\n"; Main Street Pizza Company\n"; Corner Cafe\n"; The Chef's Kitchen\n"; Read Aloud Ő Headings
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Header Files
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