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
Artist 52 [7]
3 years ago
9

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: -10
Max miles: 40
Here's what I have so far:
import java.util.Scanner;
public class ArraysKeyValue {
public static void main (String [] args) {
final int NUM_ROWS = 2;
final int NUM_COLS = 2;
int [][] milesTracker = new int[NUM_ROWS][NUM_COLS];
int i = 0;
int j = 0;
int maxMiles = 0; // Assign with first element in milesTracker before loop
int minMiles = 0; // Assign with first element in milesTracker before loop
milesTracker[0][0] = -10;
milesTracker[0][1] = 20;
milesTracker[1][0] = 30;
milesTracker[1][1] = 40;
//edit from here
for(i = 0; i < NUM_ROWS; ++i){
for(j = 0; j < NUM_COLS; ++j){
if(milesTracker[i][j] > maxMiles){
maxMiles = milesTracker[i][j];
}
}
}
for(i = 0; i < NUM_ROWS; ++i){
for(j = 0; j < NUM_COLS; ++j){
if(milesTracker[i][j] < minMiles){
minMiles = milesTracker[i][j];
}
}
}
//edit to here
System.out.println("Min miles: " + minMiles);
System.out.println("Max miles: " + maxMiles);
}
Computers and Technology
1 answer:
lina2011 [118]3 years ago
8 0

Answer: 40, 4

Explanation:

You might be interested in
Consider two communication technologies that use the same bandwidth, but Technology B has twice the SNR of technology A. If tech
MrRissso [65]

Answer:

55kbps

Explanation:

7 0
3 years ago
If every company is now a technology company, then what does this mean for every student attending a business college
timofeeve [1]

Answer:

Explanation:

There are all sorts of possibilities for, say, inserting new technologies into existing processes. But most of these improvements are incremental. They are worth doing; in fact, they may be necessary for survival. No self-respecting airline, for instance, could do without an application that lets you download your boarding pass to your mobile telephone. It saves paper, can't get lost and customers want it.

But while it's essential to offer applications like the electronic boarding pass, those will not distinguish a company. Electronic boarding passes have already been replicated by nearly every airline. In fact, we've already forgotten who was first.

5 0
3 years ago
Need help to answer this question​
valina [46]

Answer:

D. The sun

Explanation: Illuminated objects are objects that are capable of reflecting light to our eyes. The sun is an example of a luminous object, while the moon is an illuminated object.

3 0
3 years ago
Read 2 more answers
Merry Mint Pickaxe Giveaway<br><br>Username And Password <br><br>This is actually legit
dolphi86 [110]

Answer:

ok

Explanation:

username: none of your buissness

password: stop lying

do you think we're dumb enough to fall for your trick

4 0
3 years ago
Read 2 more answers
Explain word processing ​
riadik2000 [5.3K]

Answer:

Word processing refers generally to the creation, editing, formatting, storage, and output of both printed and online or electronic documents. Word processing is undoubtedly the most-used business application for personal computers, perhaps alongside World Wide Web browsers and electronic-mail (e-mail) applications.

Explanation:

6 0
4 years ago
Read 2 more answers
Other questions:
  • Which new jobs will be in demand in the next 20 years
    5·1 answer
  • _____ are shown on an assembly drawing to reference parts to the parts list.
    15·1 answer
  • This is not a factor that you should use to determine the content of your presentation. Your audience your goals your purpose yo
    7·2 answers
  • When a defendant pleads guilty to one offense just to have another offense dropped, this is what type of plea bargain
    14·2 answers
  • An intranet that is partially accessible to authorized people outside the business or organization is known as an
    7·2 answers
  • Which one of the following words means most nearly the opposite of RANDOM? (remember,opposite)
    12·1 answer
  • In a microsoft word document, what is the amount of space that appears between paragraphs called?
    14·1 answer
  • A virus that is embedded in the automatically executing scipts commonly found in word processors, spreadsheets, and database app
    13·2 answers
  • Brian is a computer engineer who writes security software for a banking system. The
    13·1 answer
  • Please dont delete. my teacher said to see how many people I could meet on here. THIS IS A BIG PART OF MY GRADE!! DO NOT REPORT!
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!