Can you use the template that I give to write it. Thank you in C++.
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
Related questions
Question
Can you use the template that I give to write it. Thank you in C++.
![16
17
#include <iostream>
18
#include <iomanip>
19
20
using namespace std;
21
22
const int QUARTERS
4;
23
24
// Write the prototype of printSalseData here.
25
26
27 int main() {
double salesData [3] [QUARTERS] {0};
for (int div
for (int qtr
28
29 E
30 E
0; div < 3; ++div) {
0; qtr < QUARTERS; ++qtr) {
31
cin >> salesData[div][qtr];
}
// Complete the call statement below.
printSalesData();
34
35
36
return 0;
37
}
38
39
// Write the definition of printSalseData here.
40
41
42
43
O H N
M M M M](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F8d2af6b8-35d3-4327-94c1-a05ff77beaf0%2Ff34e1087-2aa8-4d22-bb35-557ae81e1940%2Fxkteuagi_processed.png&w=3840&q=75)
Transcribed Image Text:16
17
#include <iostream>
18
#include <iomanip>
19
20
using namespace std;
21
22
const int QUARTERS
4;
23
24
// Write the prototype of printSalseData here.
25
26
27 int main() {
double salesData [3] [QUARTERS] {0};
for (int div
for (int qtr
28
29 E
30 E
0; div < 3; ++div) {
0; qtr < QUARTERS; ++qtr) {
31
cin >> salesData[div][qtr];
}
// Complete the call statement below.
printSalesData();
34
35
36
return 0;
37
}
38
39
// Write the definition of printSalseData here.
40
41
42
43
O H N
M M M M

Transcribed Image Text:The company has three divisions. The program uses a 2-D array of three rows and four columns. Each column
represents one quarter of the year. Each row represents the sales data of one division.
The program consists of a main function and another function for displaying a 2-D array passed in through arguments.
The program has defined a global constant to represent the number 4 as the four quarters of an year. Use this constant
identifier wherever the number 4 is required as the four quarters of a year.
Write the prototype for the function named printSalesData above the main function. The function receives a 2-D array
as the first argument and the number of divisions as the second argument. It returns void.
The main function has a 2-D array defined and initialized. It then reads the data from user to fill the array. You need to
supply the data when the program runs.
Complete the call statement that calls printSalesData function with the appropriate arguments to print the report.
Below the main function, write the definition of printSalseData.
Test The Program with the following input.
201.24
150.91
270.83
421.51
312.43
422.14
251.85
732.53
271.83
321.55
321.67
641.69
Here is the expected output.
Corporation Sales Report
DIV
Q1
Q2
Q3
Q4
201.24
150.91
270.83
421.51
1
312.43
422.14
251.85
732.53
271.83
321.55
321.67
641.69
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images

Knowledge Booster
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.Recommended textbooks for you

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)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

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)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON

Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education