Find the maximum value and minimum value in miles Tracker. Assign the maximum value to maxMiles,...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Find the maximum value and minimum value in miles Tracker. Assign the maximum value to maxMiles, and the minimum value to minMiles. Ex: If the input is -10 20 30 40 the output is: Min miles: -10 Max miles: 40 (Notes) Learn how our autograder works 1 import java.util.Scanner; 2 3 public class ArrayskeyValue ( 4 5 6 7 8 9 10 11 12 13 14 15 16 17 public static void main (String [] args) { Scanner senr = new Scanner(System.in); final int NUM ROWS = 2; final int NUM_COLS - 2; int [][] milesTracker new int [NUM_ROWS] [NUM_COLS]; int i; int i; int maxMiles; // Assign with first element in milesTracker before Loop int minMiles; // Assign with first element in milesTracker before Loop for (i = 0; i < miles Tracker.length; 1++){ for (1=0; j < milesTracker[1].length; i++) { milesTracker[1][1] = scne.nextInt(); 484924 3417574.qx3zay7 9 10 11 12 13. 14 15 16 17 18 19 20 21 22 23 24 25} Run } int i; int j; int maxMiles; // Assign with first element in milesTracker before Loop int minMiles; // Assign with first element in milesTracker before Loop for (i = 0; i< milesTracker.length; i++) { for (j = 0; j< milesTracker[i].length; j++){ milesTracker[i][j] = scnr.nextInt (); } } /* Your solution goes here */ System.out.println("Min miles: + minMiles); System.out.println("Max miles: + maxMiles); H Find the maximum value and minimum value in miles Tracker. Assign the maximum value to maxMiles, and the minimum value to minMiles. Ex: If the input is -10 20 30 40 the output is: Min miles: -10 Max miles: 40 (Notes) Learn how our autograder works 1 import java.util.Scanner; 2 3 public class ArrayskeyValue ( 4 5 6 7 8 9 10 11 12 13 14 15 16 17 public static void main (String [] args) { Scanner senr = new Scanner(System.in); final int NUM ROWS = 2; final int NUM_COLS - 2; int [][] milesTracker new int [NUM_ROWS] [NUM_COLS]; int i; int i; int maxMiles; // Assign with first element in milesTracker before Loop int minMiles; // Assign with first element in milesTracker before Loop for (i = 0; i < miles Tracker.length; 1++){ for (1=0; j < milesTracker[1].length; i++) { milesTracker[1][1] = scne.nextInt(); 484924 3417574.qx3zay7 9 10 11 12 13. 14 15 16 17 18 19 20 21 22 23 24 25} Run } int i; int j; int maxMiles; // Assign with first element in milesTracker before Loop int minMiles; // Assign with first element in milesTracker before Loop for (i = 0; i< milesTracker.length; i++) { for (j = 0; j< milesTracker[i].length; j++){ milesTracker[i][j] = scnr.nextInt (); } } /* Your solution goes here */ System.out.println("Min miles: + minMiles); System.out.println("Max miles: + maxMiles); H
Expert Answer:
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
1. What shape will result by rotating the black line segment around the red line? 2. What is the general area formula for that shape? (If you're using the text entry option, use the "Insert Math...
-
The Julian calendar was a reform of the Roman calendar introduced by Julius Caesar in 46 BC (708 AUC). It took effect in 45 BC (709AUC). It was the predominant calendar in most of Europe, and in...
-
Explain the advantages of using JDBC metadata for Java database applications.
-
The ++ particle is a baryon that decays via the strong interaction. Its strangeness, charm, topness, and bottomness are all zero. What combination of quarks gives a particle with these properties?
-
Felicity runs her familys small cupcake shop, which designs and bakes cupcakes in different flavors. The capital stock of the firm consists of three machines of various vintages, each of which can...
-
Respondents Varsity Brands, Inc., Varsity Spirit Corporation, and Varsity Spirit Fashions & Supplies, Inc., design, make, and sell cheerleading uniforms. Respondents have obtained or acquired more...
-
On January 29, Quality Marble Inc., a marble contractor, issued for cash 75,000 shares of $10 par common stock at $23, and on May 31, it issued for cash 100,000 shares of $4 par preferred stock at...
-
Lets summarize the analysis we carried out in the VC. What is driving economic (GDP) growth in India? What is driving it in China? As you look forward, how does this influence your expectations of...
-
1. Prepare manual entries and complete the general and subsidiary ledgers. 2. Prepare an account receivable and account payable reconciliation of the subsidiary ledger accounts to the control...
-
Jasper makes a $25,000, 90-day, 7% cash loan to Clayborn Co. what would be Jasper's entry to record collection of the note and interest at maturity: (Use 360 days per year).
-
Landmines Cheap and easy to deploy, many fighting forces routinely use mines to defend a frontier, deny opponents the use of a road, and many other purposes. Often these landmines remain active long...
-
An advertising agency charges clients for all its services and credits any media commissions earned to the client. What method of compensation does it use?
-
What strategies are employed to manage the complexities of patching interconnected systems within cloud computing environments, encompassing considerations such as multi-tenancy, shared...
-
A company's CFO wants to maintain a target debt-to-equity ratio of 25%. If the WACC is 9%, and the pre-tax cost of debt is 2%, what is the cost of common equity assuming a corporate tax rate of 40%?
-
Prairie Landscaping borrowed funds from Soy Capital Bank to purchase a new tractor, which served as collateral securing the loan. Soy Capital perfected its security interest by filing a financing...
-
The ledger of Splish Rental Agency on March 31 of the current year includes the following selected accounts before adjusting entries have been prepared. Debit Credit Prepaid Insurance $3,828 Supplies...
-
4. Jobe dy -Y 2 et by
-
How much of each of the following prizes or awards is taxable? a. Cheline received a $50,000 gift bag at the Oscars in 2012. b. Jon received a gold watch worth $350 for 25 years of service to his...
-
The following additional information is available for the Dr. Ivan and Irene Incisor family. The Incisors own a rental beach house in Hawaii. The beach house was rented for the full year during 2012...
-
Olive Corporation was formed and began operations on January 1, 2012. The corporation's income statement for the year and the balance sheet at year-end are presented below. The corporation made...
-
What are the six books of original entry?
-
Show the journal entries necessary to record the following items: 2017 Apr 1 Bought office furniture on credit from Durham Brothers Ltd 1,400. 4 We take goods costing 270 out of the business...
-
You are to show the journal entries necessary to record the following items which occured in 2016: (a) May 1 Bought a motor bike on credit from Lakeside Garage for 5,500. (b) May 3 A debt of 347...
Study smarter with the SolutionInn App