The rainfalls in Manama are available for each day of the past four weeks. In your program: • Create a two-dimensional array names rain of size 4x7 that contains rainfall figures in which each row represents a week, and each column represents a day. • Display the rainfall data in a table format. • Display the total rainfall for each week. For example, if the array contains the following rainfall data:

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter10: Pointers
Section10.3: Pointer Arithmetic
Problem 3E
icon
Related questions
Question
The rainfalls in Manama are available for each day of the past four weeks. In your program:
• Create a two-dimensional array names rain of size 4x7 that contains rainfall figures in
which each row represents a week, and each column represents a day.
• Display the rainfall data in a table format.
• Display the total rainfall for each week.
For example, if the array contains the following rainfall data:
Days
o 1 2 3
4 5 6
Week 0
3
7
21
Week 1
1
1
4
Week 2
7
Week 3 0
1
Then the output of the method should be displayed as shown below.
Sample Input/Output:
Week Rainfall
Total
1
30078 21 o
39
0 1100 0 4
9 6700 0 o
0 00 0 0 o 1
2
6
3
22
4
1
00
6.
Transcribed Image Text:The rainfalls in Manama are available for each day of the past four weeks. In your program: • Create a two-dimensional array names rain of size 4x7 that contains rainfall figures in which each row represents a week, and each column represents a day. • Display the rainfall data in a table format. • Display the total rainfall for each week. For example, if the array contains the following rainfall data: Days o 1 2 3 4 5 6 Week 0 3 7 21 Week 1 1 1 4 Week 2 7 Week 3 0 1 Then the output of the method should be displayed as shown below. Sample Input/Output: Week Rainfall Total 1 30078 21 o 39 0 1100 0 4 9 6700 0 o 0 00 0 0 o 1 2 6 3 22 4 1 00 6.
Expert Solution
steps

Step by step

Solved in 5 steps with 2 images

Blurred answer
Knowledge Booster
Array
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
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
New Perspectives on HTML5, CSS3, and JavaScript
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:
9781305503922
Author:
Patrick M. Carey
Publisher:
Cengage Learning