1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
salantis [7]
3 years ago
11

Question 4(10pt): sum of the max value found in each row Write a function maxSum that takes two parameters; a 2D integer array w

ith 10 columns, and the number of rows. The function must return the sum of the maximum value from each row.
Computers and Technology
1 answer:
mario62 [17]3 years ago
5 0

Answer:

Following is the program in c++ language  

#include <iostream> // header file

using namespace std; // namespace

int maxSum(int ar[][10],int r) // function definition of  maxsum

{

  int s=0; // varaible declaration

  for(int k=0;k<r;k++)// iterating the loop

  {

      int maximum=ar[k][0]; //finding the maximum value

      for(int k2=0;k2<10;k2++)// iterating the loop

      {

          if(maximum<ar[k][k2]) // check the condition

          {

            maximum=ar[k][k2];   // storing the value in the maximum variable

          }

           }

       s=s+maximum;//adding maximum value to the sum

  }

  return s; // return the sum

}

int main() // main function

{

  int ar[][10]={{5,2,8,-8,9,9,8,-5,-1,-5},{4,1,8,0,10,7,6,1,8,-5}}; // initilaized array

  cout<<"sum of maximum value:";

  int t=maxSum(ar,2); // function calling

  cout<<t; // display the maximum value

}

Output:

sum of maximum value:19

Explanation:

Following are the description of Program  

  • The main method declared and initialized an array ar with the column value 10.
  • After that call the method maxsum .The control will move to the function definition of maxsum.
  • In the function header of maxisum there are two value i.e array "ar" and "r".
  • In this function definition, we adding the maximum value to the sum and return the variable "s".
  • In the main function, we print the value.
You might be interested in
A DBMS commonly receives data update requests from application programs.A. TrueB. False
Contact [7]

Answer:

A. True

Explanation:

DBMS is an acronym for database management system and it can be defined as a collection of software applications that typically enables computer users to create, store, modify, retrieve and manage data or informations in a database. Generally, it allows computer users to efficiently retrieve and manage their data with an appropriate level of security.

Some examples of a database management system (DBMS) are RDBMS, Oracle, SQL server, PostgreSQL, dBASE, Clipper, MySQL, Microsoft Access, etc.

A DBMS commonly receives data update requests from application programs through the Open Database Connectivity ( ODBC ) driver in case of communication with other database management softwares.

Basically, when a database management system (DBMS) receives data update requests from application programs, it simply instructs the operating system installed on a server to provide the requested data or informations.

4 0
3 years ago
460N of force is exerted on an object with a surface area of 2,5m.How much pressure is felt by the object?​
BartSMP [9]

Explanation:

p=F/A

p=460N/2m×5m

=46N/m2

7 0
2 years ago
Read 2 more answers
A check list should be based on that apply to your industry.
frozen [14]
Can you please elaborate? This is as your question isn't very clear.
6 0
3 years ago
Read 2 more answers
This is a glitch ? 


 










































mixer [17]

Answer:

I think no...Brainly might not allow unique text's.

8 0
3 years ago
Which frequency will 802.11n work on if on a single-link network?
Allushta [10]

802.11n can function in "mixed mode" on the 2.4 GHz frequency, with a theoretical maximum speed of 300 Mbps, or on the 5 GHz frequency.

<h3>What do you mean by frequency?</h3>

In the case of electrical current, frequency is the number of times a sine wave repeats or completes, a positive-to-negative cycle.

802.11n can operate in "mixed mode" on the 2.4 GHz frequency, which will support just 802.11b or 802.11g-capable systems but will slow the entire network down to the maximum speed of the earliest standard connected, at a theoretical maximum speed of 300 Mbps.

Learn more about the single-link network:

brainly.com/question/4272298

#SPJ1

8 0
1 year ago
Other questions:
  • Tasks:_______.
    7·1 answer
  • True or False <br><br> The term virus and malware may be used interchangeably.
    13·1 answer
  • you just bought a new hard drive for your computer .you plan to use this as a secondary hard drive to store alll your files. wha
    15·1 answer
  • Create a do-while loop that asks the user to enter two numbers. The numbers should be added and the sum displayed. The loop shou
    5·1 answer
  • Rachel needs to include a new organizational chart in her project. Which type of illustration should she use?: *
    11·1 answer
  • Why are medical related professions and human resources important? ​
    8·1 answer
  • Which part of the brain controls the movement of muscles​
    6·1 answer
  • 7.2 code practice edhesive. I need help!!
    13·1 answer
  • Who invented computer ?​
    9·2 answers
  • How does xm satellite deter nonsubscribers from listening to its transmissions? Does this make the radio programing a private go
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!