Computer Science Homework Solutions
Problem
#165991

Write a program that reads a 5 x 5 two-dimensional array of integers and then prints the row sums and the column sums

Write a program that reads a 5 x 5 two-dimensional array of integers and then prints the row sums and the column sums:


Enter row 1: 8 3 9 0 10
Enter row 2: 3 5 17 1 1
Enter row 3: 2 8 6 23 1
Enter row 4: 15 7 3 2 9
Enter row 5: 6 14 2 6 0

Row Totals:
Column Totals:

You may either initialize this array within the program or have the user type in the values at run time.

Solution
What is this?
By OTA - Overall OTA Rating
Yupei Xiong, PhD - 4.8/5
Purchase Cost Now
$2.19 CAD (was ~$11.97)
Included in Download
  • Plain text response
  • Attached file(s):
    • 165991.c
$2.19 Instant Download
Add to Cart
Why you can trust BrainMass.com
  • Your Information is Secure
  • Best Online Academic Help Service
  • Students find real academic Success
Related Solutions
  • Storing three-dimensional homogeneous arrays - Describe a method for storing three-dimensional homogeneous arrays. What addressing formula would be used to locate the entry in the ith plane, jth row, and the kth column?
  • C++ problem - Write a program, employe_data.cpp, with the Employee class that has two employees; sets their age, yearsOfService, and salary (rounded to the nearest thousands of dollars; and prints their values. (yo ...
  • Briefly discuss Arrays. - Briefly discuss arrays. When would you use an array? Waht are the benefits? How are they created? What is a multidimensional array?
  • What is a data type in C? Describe two data types and how they might be used in a C program. - 1. What is a data type in C? Describe two data types and how they might be used in a C program. 2. What is the difference between a constant and a variable in a program? Why would you use one or th ...
  • Arrays and Strings - Please do not make the codes too complicated. Our topic for this program is Arrays and Strings. See attached file.
Browse