Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
Q 2. A 2 dimensional array of doubles has the same number of rows and columns (a square array). Assume the valuesare already loaded in the array. Write a loop to calculate the sum total of the elements of the diagonal (the elementswith the same row and column subscript values). In the following example 4x4 2-d array, the elements on the diagonalare in boldface type. Use the partial declarations given.12 8 -11 76 3 0 2.97 7 -11 10-3 -7 4 8array< array<double, 4>, 4> mat = { the initial values would go here };double sum = 0.0;// write the codePage 2 of 2 2013-12-09for (int i(0); i < 4; i++)sum += mat[i][i];Q 3. A 2 dimensional array of doubles has the same number of rows and columns (a square array). Assume the valuesare already loaded in the array. Write a loop to calculate the sum total of the elements of the anti-diagonal (theelements whose row and column subscripts add up to the number of rows (or number of columns as they are equal) ?1). In the following example 4x4 2-d array, the elements on the anti-diagonal are in boldface type. Use the partialdeclarations given.12 8 -11 76 3 0 2.97 7 -11 10-3 -7 4 8array< array<double, 4>, 4> mat = { the initial values would go here};double sum = 0.0;// write the codeQ 4. Repeat these questions by writing functions that receive the arrays as constant reference parameters and returnthe appropriate values through the function name (via return statement). The function header could look like:double sumDiag(const array< array<double, 4>, 4> & mat) {// write the code} // end functiondouble sumAntiDiag(const array< array<double, 4>, 4> & mat) {double sum = 0.0;for (int i(0); i < 4; i++)sum += mat[i][3 - i]; // Note: i + (3 - i) = 4 - 1return sum;} // end function
Create program that uses functions and reference parameters, and asks user for the outside temperature.
Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles
Calculate and store the average for each row and column. Determine and store the values for the Average Map.
Write a webservices application that does a simple four function calculator
Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.
Explain Model-View-Controller paradigm
How many levels of nesting are there in this design?
Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.
Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.
Design a base class shape with virtual functions
Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data
Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.
Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!
whatsapp: +1-415-670-9521
Phone: +1-415-670-9521
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd