Question

Hey guys I need a c++ function to find the largest element in a 2d array...Please!!!!...

Hey guys I need a c++ function to find the largest element in a 2d array...Please!!!! Thanks!!!

0 0
Add a comment Improve this question Transcribed image text
Answer #1

void findLargest(double x[][COLS])

{

    int max=x[0][0];

        int i,j;

     

    for (i=0; i<ROWS; i++)

        for (j=0; j<COLS; j++)

        {  

            if(x[i][j]> max)

            max= x[i][j];

          cout<<"Largest element is:"<<x[i][j];

           }

}

Add a comment
Know the answer?
Add Answer to:
Hey guys I need a c++ function to find the largest element in a 2d array...Please!!!!...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • [C++ Language] Define a function to find the largest element from an integer array.

    [C++ Language] Define a function to find the largest element from an integer array.

  • Hey guys please give me the answers quickly I need it so quick I will give...

    Hey guys please give me the answers quickly I need it so quick I will give you a good rate thank you The decomposition of an aldehyde solution in carbon tetrachloride is a first order reaction with a rate constant of 1.20 x 10"min". If we start with (aldehyde) = 0.0500 molar, what will the concentration be 150 minutes later? a. 0.00900 M b. 0.0418 M C. 0.00926 M d. 0.00499 M e. 0.000333 M 1 batin tha hafif

  • Hey guys, I am having a lot of trouble with my homework. Could you please help?...

    Hey guys, I am having a lot of trouble with my homework. Could you please help? I thumbs up anyone who gives a thorough explanation and shows the work! I really need to understand these concepts! Thanks guys! 1) Z- is a weak base. An 0.350 M aqueous solution of NaZ is prepared. The pH of the solution was 8.93 at 25.0°C. The Kb of Z- is: 2) The base-ionization constant of ethylamine (C2H5NH2) is 6.4 x 10-4 at 25.0...

  • Hey guys, I am having a lot of trouble with my homework. Could you please help?...

    Hey guys, I am having a lot of trouble with my homework. Could you please help? I thumbs up anyone who gives a thorough explanation and shows the work! I really need to understand these concepts! Thanks! 1) At 25 °C, the Ka for formic acid (HCO2H) is 1.8 x 10-4. What is the pH of a 0.10 M aqueous solution of lithium formate (LiHCO2)? 2) What is the pH (aq., 25 °C) of this solution: adding 1.64 grams of...

  • Please code using C++ Thank you Write a function that receives a 2d array of type...

    Please code using C++ Thank you Write a function that receives a 2d array of type double and returns the average of all elements in the 2d array

  • Hey guys, I am having a lot of trouble with my homework. Could you please help?...

    Hey guys, I am having a lot of trouble with my homework. Could you please help? I thumbs up anyone who gives a thorough explanation and shows the work! I really need to understand these concepts! Thanks a bunch! 1) At 25 °C, the pH of a 0.15 M aqueous solution of CsZ (the cesium salt of HZ) is 10.70. What is the Ka for HZ? 2) Calculate the pH of 0.586 M anilinium hydrochloride (C6H5NH3CI) solution in water at...

  • Hey guys, I am having a lot of trouble with my homework. Could you please help?...

    Hey guys, I am having a lot of trouble with my homework. Could you please help? I thumbs up anyone who gives a thorough explanation and shows the work! I really need to understand these concepts! Thanks in advance! 1) At 25 °C, the pH of a 0.15 M aqueous solution of CsZ (the cesium salt of HZ) is 10.70. What is the Ka for HZ? 2) Calculate the pH of 0.586 M anilinium hydrochloride (C6H5NH3CI) solution in water at...

  • Hey guys, I need help writing a Tic-Tac-Toe game programmed in Java. The game has to...

    Hey guys, I need help writing a Tic-Tac-Toe game programmed in Java. The game has to be a 1D (One-Dimension) array board NOT 2D. It has to be a human plays against the computer type of Tic-Tac-Toe. Here is the requirements for the program. PLEASE NO COPY AND PASTE ANSWER. Thank you in advance! You will develop a program in which a human plays against the computer. 1. Validate user input at every opportunity. a. Do not allow number entries...

  • Hey everyone, I need help making a function with this directions with C++ Language. Can you...

    Hey everyone, I need help making a function with this directions with C++ Language. Can you guys use code like printf and fscanf without iostream or fstream because i havent study that yet. Thanks. Directions: Write a function declaration and definition for the char* function allocCat. This function should take in as a parameter a const Words pointer (Words is a defined struct) The function should allocate exactly enough memory for the concatenation of all of the strings in the...

  • Hey guys, Thanks so much for helping me out! Please show me all the work, as...

    Hey guys, Thanks so much for helping me out! Please show me all the work, as I want to learn! John invested the following amounts in three stocks: Security Investment Beta Stock A 1.20 $562,900 $748.170 Stock B 1.54 Stock C $361,712 2.03 Calculate the beta portfolio.

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT