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
Ulleksa [173]
3 years ago
5

#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;
Computers and Technology
1 answer:
VARVARA [1.3K]3 years ago
5 0

Answer:

#include <iostream>

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;

   

   maxMiles = milesTracker[0][0];

   minMiles = milesTracker[0][0];

   

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

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

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

               maxMiles = milesTracker[i][j];

           }

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

               minMiles = milesTracker[i][j];

           }

       }

   }

   

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

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

   return 0;

}

Explanation:

It seems you want to find the min and max value in the array. Let me go through what I added to your code.

Set the maxMiles and minMiles as the first element in milesTracker

Create a nested for loop that iterates through the milesTracker. Inside the loop, check if an element is greater than maxMiles, set it as maxMiles. If an element is smaller than minMiles, set it as minMiles.

When the loop is done, print the minMiles and maxMiles

You might be interested in
What makes jambinai so unique (it’s for band)
Rus_ich [418]

Answer:

Jambinai combines Korean folk music instruments and rock music instrumentation, which creates a different music style.

7 0
2 years ago
_____ can be either software-based or deployed via hardware, such as a recording "dongle" that is plugged in between a keyboard
Monica [59]
<span>Keyloggers can be either software-based or deployed via hardware, such as a recording "dongle" that is plugged in between a keyboard and a PC.
</span><span>The keylogger is also called keystroke logger or system monitor. This technology used to monitor and record each keystroke typed on a specific computer's keyboard. </span>
6 0
3 years ago
In the airline industry, frequent flyer programs, ticket kiosks, and e-ticketing are all examples of capabilities that are _____
crimeas [40]

Answer:

valuable; rare

Explanation:

A valuable capability is that which gives a firm some competitive advantage. Core competencies are the operational activities that a company does best. A business’s core competencies are what distinguish it from other rival companies in its industry. While Rare capabilities are capabilities that a small amount of, if any, competitors possess. Those type of capabilities that are costly or impossible to imitate.

from the above explanation we can deduce that the modern technology implementation in the airline industry has made it possible to have valuable ptograms and softwares for carring out several task which are no longer scarce to procure.

7 0
3 years ago
A computer has many resources. A resource can be memory, disk drive, network bandwidth, battery power, or a monitor. It can also
bekas [8.4K]

Answer:

The security principle being referred to here is:

Resource Encapsulation.

Explanation:

Resource Encapsulation is one of the cybersecurity first principles.  It allows access or manipulation of the class data as intended by the designer. The cybersecurity first principles are the basic or foundational propositions that define the qualities of a system that can contribute to cybersecurity.  Other cybersecurity first principles, which are applied during system design, include domain separation, process isolation, modularization, abstraction, least principle, layering, data hiding, simplicity, and minimization.

7 0
3 years ago
In textual​ messages, __________ includes the area surrounding​ headings, margins, paragraph​ indents, space around​ images, ver
rosijanka [135]

Answer:

The answer is "White space".

Explanation:

The textual​ messaging is a method for name, that consists of choosing verses, a chapter, or even the part of a chapter as a text. This method includes whitespace.

  • It is the area between the items on a website page. Generally, those items are pictures, typeface, and symbols.  
  • It is often used to align elements on a website by providing a smooth flow via the material for all the readers to move across.
3 0
2 years ago
Read 2 more answers
Other questions:
  • loop Write a program to read a list of exam scores given as integer percentages in the range 0 to 100. Display the total number
    5·1 answer
  • In a spreadsheet, what is the rectangular space where a row meets a column?
    5·2 answers
  • What should be included in the closing portion of your letter or e-mail?
    12·2 answers
  • You don't have policies that force settings for the look of users' computer desktops. Each user's chosen desktop settings are ap
    15·2 answers
  • Intellectual ______ is the legal term for ownership of intangible assets such as ideas, art, music, movies, and software.
    13·2 answers
  • A stateless firewall inspects each incoming packet to determine whether it belongs to a currently active connection.
    9·1 answer
  • Very Short Answer Type Question (any 9)
    12·1 answer
  • Adam has designed and tested an Android app for a startup. The client expects to get quick responses to the app. After consultin
    7·1 answer
  • 1- pensamiento sistémico<br>2- visión oriental y occidental​
    8·1 answer
  • I will give brainyest
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!