Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can anyone help me complete my code? PLEASE NO ARRAYS i'm struggling to understand please add comments to help me complete future code. 5.7 Lab

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

Can anyone help me complete my code? PLEASE NO ARRAYS i'm struggling to understand please add comments to help me complete future code.

5.7 Lab 32: Average of Numbers in Rows Use the following table of numbers to help you visualize the data for this problem: Write a program that accomplishes the following objectives: 1. reads in the number of rows, then the number of columns, 2. using nested FOR loops, reads in the column data for each row, 3. adds up the data for each row and derives an average for each row, 4. also adds up all the data in the table and derives an overall average. Hints: 1. Look at slides 3 and 4 of CS1336_Lect5e_nested_loops.pptx and Pr5-14.cpp for samples of nested FOR loops, especially line 38 in slide 4 for a calculation of average per student. That is very much like a row average. 2. Have two running total variables, for example rowsum and totalsum. Initialize totalsum to 0 in the beginning of the program. Initialize rowsum to 0 before the inner loop (see line 29 in slide 4). Keep running totals for both of these inside the inner loop (see line 36 in slide 4). Average the rowsum after the inner loop ends (see line 38 in slide 4). Average the totalsum after the outside loop ends. When the input is as shown in Figure 1, your program should produce the output as shown in Figure 2. Figure 1: (sample input) When the input is as shown in Figure 1 , your program should produce the output as shown in Figure 2 . Figure 1: (sample input) 2323.113.581456.78346.2945.71 Program output displayed here

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Mastering Real Time Analytics In Big Data A Comprehensive Guide For Everyone

Authors: Lennox Mark

1st Edition

B0CPTC9LY9, 979-8869045706

More Books

Students also viewed these Databases questions

Question

a retional database is

Answered: 1 week ago