The picture is my program and and the bottom it shows my output. I need the output to look like the other picture and the numbers on top includes the input for the number of people, the average slice each person would eat and the cost of each pizza. I want any number to work for this program so what exactly am i doing wrong that my output is coming out like that.

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
icon
Concept explainers
Question
The language is C++. The picture is my program and and the bottom it shows my output. I need the output to look like the other picture and the numbers on top includes the input for the number of people, the average slice each person would eat and the cost of each pizza. I want any number to work for this program so what exactly am i doing wrong that my output is coming out like that.
main.cpp
8
9 #include <iostream>
10 #include <iomanip>
11 #include <cmath>
12 using namespace std;
13
14 int main() {
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//Constants and Variables
int numOfPeople 0;
int pizza;
double avgSlices = 0.0, costOfPizza 0.0;
double TAX_RATE=0.07, DELIVERY_FEE = 0.2;
double subTotal = 0.0, total = 0.0, weekTotal = 0.0, tax = 0.0, fee = 0.0;
double deliveryCost = 0.0;
//Input for Friday
cin >> numOfPeople >> avgSlices >> costOfPizza >> pizza;
44 }
45
//Calculate
subTotal = (numOfPeople avgSlices costOfPizza) / 8;
tax = subTotal * TAX_RATE;
deliveryCost = tax+ DELIVERY_FEE;
total
subTotal + deliveryCost;
pizza = ceil((numOfPeople* avgSlices) / 8);
//Output for Friday
cout << "Friday Night Party" << endl;
cout << fixed << setprecision (2) << subTotal << tax << fee <<< total;
cout << fixed <<setprecision(0) << pizza;
cout << pizza <<< " Pizzas: "
subTotal << endl;
cout << "Tax: " << tax << endl;
cout << "Delivery:
cout << "Total: << total << endl;
return 0;
<< fee << endl;
input
Compiled Successfully. memory: 3568 time: 0.26 exit code: 0
Friday Night Party
34.122.390.0036.7144 Pizzas: 34
Tax: 2
Delivery: 0
Total: 37
ste
Transcribed Image Text:main.cpp 8 9 #include <iostream> 10 #include <iomanip> 11 #include <cmath> 12 using namespace std; 13 14 int main() { 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 //Constants and Variables int numOfPeople 0; int pizza; double avgSlices = 0.0, costOfPizza 0.0; double TAX_RATE=0.07, DELIVERY_FEE = 0.2; double subTotal = 0.0, total = 0.0, weekTotal = 0.0, tax = 0.0, fee = 0.0; double deliveryCost = 0.0; //Input for Friday cin >> numOfPeople >> avgSlices >> costOfPizza >> pizza; 44 } 45 //Calculate subTotal = (numOfPeople avgSlices costOfPizza) / 8; tax = subTotal * TAX_RATE; deliveryCost = tax+ DELIVERY_FEE; total subTotal + deliveryCost; pizza = ceil((numOfPeople* avgSlices) / 8); //Output for Friday cout << "Friday Night Party" << endl; cout << fixed << setprecision (2) << subTotal << tax << fee <<< total; cout << fixed <<setprecision(0) << pizza; cout << pizza <<< " Pizzas: " subTotal << endl; cout << "Tax: " << tax << endl; cout << "Delivery: cout << "Total: << total << endl; return 0; << fee << endl; input Compiled Successfully. memory: 3568 time: 0.26 exit code: 0 Friday Night Party 34.122.390.0036.7144 Pizzas: 34 Tax: 2 Delivery: 0 Total: 37 ste
10
2.6
The output is:
Friday Night Party
4 Pizzas: $42.00
Tax: $2.94
A
10.50
Delivery: $8.99
Total: $53.93
F2
9
F3
F4
%
5
Transcribed Image Text:10 2.6 The output is: Friday Night Party 4 Pizzas: $42.00 Tax: $2.94 A 10.50 Delivery: $8.99 Total: $53.93 F2 9 F3 F4 % 5
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

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