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.
Operations
In mathematics and computer science, an operation is an event that is carried out to satisfy a given task. Basic operations of a computer system are input, processing, output, storage, and control.
Basic Operators
An operator is a symbol that indicates an operation to be performed. We are familiar with operators in mathematics; operators used in computer programming are—in many ways—similar to mathematical operators.
Division Operator
We all learnt about division—and the division operator—in school. You probably know of both these symbols as representing division:
Modulus Operator
Modulus can be represented either as (mod or modulo) in computing operation. Modulus comes under arithmetic operations. Any number or variable which produces absolute value is modulus functionality. Magnitude of any function is totally changed by modulo operator as it changes even negative value to positive.
Operators
In the realm of programming, operators refer to the symbols that perform some function. They are tasked with instructing the compiler on the type of action that needs to be performed on the values passed as operands. Operators can be used in mathematical formulas and equations. In programming languages like Python, C, and Java, a variety of operators are defined.
![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](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fba46838f-9e34-4f0f-8c41-23dd58e82361%2Fd47e7f9b-5c49-402c-a716-8a72b62241dc%2F0qnmca_processed.jpeg&w=3840&q=75)
![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](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fba46838f-9e34-4f0f-8c41-23dd58e82361%2Fd47e7f9b-5c49-402c-a716-8a72b62241dc%2Fjjul6xn_processed.jpeg&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 3 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)