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
MAVERICK [17]
3 years ago
10

Find the maximum value and minimum value in milesTracker. Assign the maximum value to maxMiles, and the minimum value to minMile

s. Sample output for the given program:Min miles: -10Max miles: 40#include using namespace std;int main( ) { const int NUM_ROWS = 2; const int NUM_COLS = 2; int milesTracker[NUM_ROWS][NUM_COLS]; int i = 0; int j = 0; int maxMiles = -99; // Assign with first element in milesTracker before loop int minMiles = -99; // Assign with first element in milesTracker before loop milesTracker[0][0] = -10; milesTracker[0][1] = 20; milesTracker[1][0] = 30; milesTracker[1][1] = 40; /* Your solution goes here */ cout << "Min miles: " << minMiles << endl; cout << "Max miles: " << maxMiles << endl;}
Computers and Technology
1 answer:
ryzh [129]3 years ago
6 0

Answer:

Following are th program in the C++ Programming Language.

#include <iostream>//set Header files

using namespace std;//set namespace

//define main function

int main()

{

//set integer constants variable

const int NUM_ROWS = 2;

//set integer constants variable

const int NUM_COLS = 2;

//set integer type array

int milesTracker[NUM_ROWS][NUM_COLS];

//set integer type variable and initialize to 0

int i = 0;

//set integer type variable and initialize to 0

int j = 0;

//set integer type variable and initialize to -99

int maxMiles = -99;

//set integer type variable and initialize to -99

int minMiles = -99;

//initialize the value in the two dimensional array

milesTracker[0][0] = -10;

milesTracker[0][1] = 20;

milesTracker[1][0] = 30;

milesTracker[1][1] = 40;

//here is the solution  

maxMiles = milesTracker[0][0];

minMiles = milesTracker[0][0];

/*set for loop to find the minimum miles and maximum miles*/

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

{

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

 {

 //set if condition for maxMiles is the bigger than

   if (milesTracker[i][j] > maxMiles)

   //initialize milesTracker[i][j] to maxMiles

     maxMiles = milesTracker[i][j];

   //set if condition for minMiles is the smaller than

   if (milesTracker[i][j] < minMiles)

   //initialize milesTracker[i][j] to maxMiles

     minMiles = milesTracker[i][j];

 }

}

//print output

cout << "Min miles: " << minMiles << endl;

//print output

cout << "Max miles: " << maxMiles << endl;

return 0;

}

<u>Output:</u>

Min miles: -10

Max miles: 40

Explanation:

Here, we define the main method and inside it:

  • set two constant integer type variable and initialize to 2
  • set integer type two-dimensional array and pass constant variables in it.
  • Set two integer type variable and initialize to 0 then, again set two integer type variable and initialize to -99.
  • Initialize the values in the two-dimensional array.
  • Set two for loop for the two-dimensional array to find the minimum and maximum miles.
  • Set two if condition to find bigger or smaller miles.

Finally, print the maximum and the minimum miles then, return 0.

You might be interested in
How many pieces can be connected on to a to an SPS​
alexira [117]

Answer:

i dont know

Explanation:

4 0
3 years ago
Which utility can extract meta-data and documents on a Website to reveal the document creator's network login, e-mail address, I
Ket [755]

Answer:

Fingerprinting Organizations with Collected Archives (FOCA)

Explanation:

FOCA (Fingerprinting Organizations with Collected Archives) was released in 2009 and is a great web manipulating tool used for many functions such as extracting metadata information of and documents on a website.

FOCA has the capability of extracting even hidden information from any document (such as Microsoft office and PDF files) which are scanned by it (FOCA). Information such as website creator's network login, e-mail addresses, IP addresses  and other information.

The metadata extracted could then be used for several purposes such as cracking of passwords.

5 0
3 years ago
Read 2 more answers
Phobas Inc. offers an online service which stores notes made by customers on the cloud. When a customer enters notes on one devi
sveta [45]

Answer:

Software as a service (SaaS)

Explanation:

Software as a service (SaaS) is a software licensing and release model in which the subscription basis of software licensing is done on a subscription basis and is centrally hosted. It is occasionally referred to as "on-demand software", and was in earlier times referred to as "software plus services" by Microsoft.

For instance, a company can write or build its own software packages and use the SaaS provider's APIs to incorporate those tools with the SaaS offering.

4 0
3 years ago
Tramon is creating a website and wants to include a striking graphic to identify the website. What type of graphic should he inc
svp [43]

Answer:

The correct option is d. banner

Explanation:

According to the given situation, Tramon develops the website and wants to involve the striking graphic so the website could be identified.

This represents the banner as the banner shows the advertisement i.e. image based rather than text based where the company information is displayed and its a way to promote the brand of the company so that it creates an awareness among the audience this results in increase in the sales of the company that directly rise the profits.

hence, the correct option is d. banner

7 0
3 years ago
For the bag class in Chapter 3 (using a fixed array and a typedef statement) what steps were necessary for changing from a bag o
stiks02 [169]

Answer:

B. Change the int to double in the typedef statement and recompile

Explanation:

A typedef declaration is used to assign names to database.

Syntax:

typedef data_type new_name;

For this case the initial deceleration was

typedef int bag;

To change it to double values we have to do following

typedef double bag;

Therefore, option B is correct change the int to double in the typedef statement and recompile.

8 0
3 years ago
Other questions:
  • Which dhcp client option is used to provide a list of domain names to use in name resolution queries?
    12·1 answer
  • Abby is creating a professional development plan to advance in her current career. She has identified what job she wants and wha
    14·1 answer
  • How to find something in the cloud?
    8·1 answer
  • How can templates be made available to other users?
    15·1 answer
  • Which of the following are documents that can help you to review and assess your organization’s status and state of security? Fi
    6·1 answer
  • Write a program to prompt the user for hours and rate per hour using input to compute gross pay. Pay the hourly rate for the hou
    12·1 answer
  • If you are signed into a Microsoft account and need to sign into another one, click ____ on the list arrow next to Your Name in
    8·1 answer
  • You upgrade your network to 1000 Mbps from 100 Mbps. You install a new 1000-Mbps network adapter into your Windows system. You c
    12·1 answer
  • Which column and row references are updated when you copy the formula f$3/15
    14·1 answer
  • Most presentations use text:
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!