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
Explain the developments RAM since it was created in 1968 til today.
xenn [34]

Answer:

From DRAM to DDR4

Explanation:

RAM stands for <em>Random Access Memory.</em> In 1968, Mr. Robert Dennard at IBM's Watson Research obtained the patent for the one-transistor cell that will eventually substitute the old magnetic core memory allocated in computers of the time. By 1969 Intel released the TTL bipolar 64-bit SRAM (Static Random-Access Memory) as well as the ROM "Read Only Memory"; also in 1969 it evolved into "<em>Phase - change memory - PRAM - </em>". However this evolution was not commercialized, Samsung expressed its interest in developing it. In 1970 the first DRAM product was commercially available; it was developed by Intel. In 1971 it was patented EPROM; in 1978 George Perlegos developed EEPROM.

By 1983 a nice breakthrough happened with the invention of SIMM by Wang Labs. In 1993 Samsung came up with KM48SL2000 synchronous DRAM (SDRAM), this variation soon turned into an inductry standard.

In 1996 DDR began a revolution in the memory sector, then in 1999 RDRAM. Both DDR2 SDRAM. DDRR3 and XDR DRAM were commercialized. Finally in 2007 and 2014 the developments of DDR3 and DDR4 were available for the general public.

6 0
2 years ago
(a)Ms word is a isa word processing software ,(b)hub provides physical connection between all computers, State true or false​
8090 [49]

Answer:

true

Explanation:

true in answer in the question

8 0
2 years ago
Read 2 more answers
If your DTP document contains watermarks on every page, where can you place them?
QveST [7]

Answer:

<h3>You can place watermarks and other recurring elements on a DTP document by following the points below:</h3><h3 />
  • Open the DTP document on which watermark is to be placed.
  • Click on Page Layout tab
  • Locate the Page Background group and click it.
  • Select the Watermark Option and then select Custom watermark.
  • A box will open when you click the Text Watermark.
  • Type the text you want and click on Insert.
  • All other changes can be done using options.

<h3>I hope it will help you!</h3>

6 0
3 years ago
identify three ways we use analog and digital signals in our everyday lives. Describe how radio telescopes are used to explore s
spayn [35]
We use analog and digital signals in our everyday lives with the radio, the cell phone and with our own computers. our computers and our cell phones are all digital now but radio's are still considered analog. Radio telescopes explore space by using radio waves and signals to almost like scan space and collect data like a sonar in a submarine. 
8 0
3 years ago
Read 2 more answers
Which Windows installation method requires that you manually rename computers after the installation?​
levacccp [35]

Answer:

Command line

Explanation:

  • After installation of the machine one needs to manually rename the computer. This can be done through the start then settings, then system, and select rename the PC in the right-hand side column.
3 0
2 years ago
Other questions:
  • Which function of a web page relies on responsive web design? Adding extra horizontal scroll Blocking mobile devices from viewin
    11·2 answers
  • Julie bought a house for $315,000 and has a $285,000 mortgage. she claims she has $315,000 in equity. is she correct? if not, ho
    12·2 answers
  • Software (often on firmware) designed to make physical products and devices "smarter" by doing things like sharing usage informa
    12·1 answer
  • Which payment method typically charges the highest interest rates
    15·1 answer
  • Employers will check you out on social media sites like Facebook, MySpace, and Twitter.
    6·2 answers
  • What type of network is capable of delivering voice, video streams, text, and graphics between many different types of devices o
    15·1 answer
  • Why was Apple the best company of 2019??
    15·2 answers
  • Write a programmer defined function that compares the ASCII sum of two strings. To compute the ASCII sum, you need to compute th
    6·1 answer
  • Explica el empleo de cuentas y contraseñas en archivos
    6·1 answer
  • Years ago when working a helpdesk, the most common question asked, almost daily, was about resetting passwords. What type of kno
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!