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
Kazeer [188]
3 years ago
11

Anyone can help me with this?

Computers and Technology
1 answer:
dybincka [34]3 years ago
5 0

Answer:

/*

 Find Largest and Smallest Number in an Array Example

 This Java Example shows how to find largest and smallest number in an  

 array.

*/

public class FindLargestSmallestNumber {

 

public static void main(String[] args) {

 

//array of 10 numbers

int numbers[] = new int[]{32,43,53,54,32,65,63,98,43,23};

 

//assign first element of an array to largest and smallest

int smallest = numbers[0];

int largetst = numbers[0];

 

for(int i=1; i< numbers.length; i++)

{

if(numbers[i] > largetst)

largetst = numbers[i];

else if (numbers[i] < smallest)

smallest = numbers[i];

 

}

 

System.out.println("Largest Number is : " + largetst);

System.out.println("Smallest Number is : " + smallest);

}

}

 

/*

Output of this program would be

Largest Number is : 98

Smallest Number is : 23

*/

Explanation:

You might be interested in
A network admin configures a static route on the edge router of a network to assign a gateway of last resort (the router that co
kupik [55]

Answer:

Use the default-information originate command.

Explanation:

A network administrator customizes a fixed path on a channel's edge router for creating any last recourse gateway that is the router connecting to the online / ISP. So, they using the usual command source to customize the edge router to connect this path instantly using RIP.

That's why the following answer is correct according to the scenario.

8 0
3 years ago
After unit and integration testing are completed, _________ testing ensures that all hardware and software components work toget
raketka [301]
Testing ensures that all hardware and software components work together
5 0
3 years ago
please write out an accurate code for the question below also please explain or I'll report you ( Thanks :) )
leva [86]

Answer: hmmmm i feel like u have to move the thingy thats shooting that light down 1 unit so it can move the planet.

Explanation: moving it down 1 unit will put it at the perfect angle to push the planet. :/

6 0
2 years ago
Read 2 more answers
How does the movement of earth in space create cycles we all experience?
Contact [7]
Actually, humans can not feel the Earth's movement because of our atmosphere(:
5 0
4 years ago
Complete main() to read dates from input, one date per line. Each date's format must be as follows: March 1, 1990. Any date not
rewona [7]

Answer:

Explanation:

The following code was written in Java it creates a switch statement for all the month values in order to turn them from Strings into integer values. Then it reads every line of input places them into an array of dates if they are the correct input format, and loops through the array changing every date into the correct output format.Ouput can be seen in the attached picture below.

import java.util.ArrayList;

import java.util.Scanner;

class Brainly {

   public static int intForMonth(String monthString) {

       int monthValue;

       switch (monthString) {

           case "January": monthValue = 1;

               break;

           case "February": monthValue = 2;

               break;

           case "March": monthValue = 3;

               break;

           case "April": monthValue = 4;

               break;

           case "May": monthValue = 5;

               break;

           case "June": monthValue = 6;

               break;

           case "July": monthValue = 7;

               break;

           case "August": monthValue = 8;

               break;

           case "September": monthValue = 9;

               break;

           case "October": monthValue = 10;

               break;

           case "November": monthValue = 11;

               break;

           case "December": monthValue = 12;

               break;

           default: monthValue = 00;

       }

       return monthValue;

   }

   public static void main(String[] args) {

       Scanner scnr = new Scanner(System.in);

       ArrayList<String> dates = new ArrayList<>();

       String date;

       String month;

       String day;

       String year;

       int i = 0;

       while (true) {

           date = scnr.nextLine();

           if (date.equals("-1")) {

               break;

           }

           dates.add(date);

       }

       for (i = 0; i < dates.size(); i++) {

           try {

               month = dates.get(i).substring(0, dates.get(i).indexOf(" "));

               day = dates.get(i).substring(dates.get(i).indexOf(" ") + 1, dates.get(i).indexOf(","));

               year = dates.get(i).substring(dates.get(i).indexOf(",") + 2, dates.get(i).length());

               System.out.println(intForMonth(month) + "/" + day + "/" + year);

           } catch (Exception e) {}

       }

   }

}

8 0
3 years ago
Other questions:
  • Pages with obvious problem with functionality or errors in displaying content
    11·1 answer
  • Max magnitude Write a method maxMagnitude() with two integer input parameters that returns the largest magnitude value. Use the
    13·1 answer
  • Prior to the release of a movie, a film studio launches a website that allows people to play online games featuring actors in th
    15·2 answers
  • If you need to add more data between column C and column D, you should _____.
    7·1 answer
  • Suppose you have a tablet with a capacity of gigabytes. For a plain text​ book, one byte typically corresponds to one character
    6·1 answer
  • Given an 10-bit two's complement binary number, what is the decimal value of the largest negative integer that can be represente
    10·1 answer
  • Given two int variables matricAge and gradAge, write a statement that gives gradAge a value that is 4 more than the value of mat
    11·1 answer
  • Resize vector countDown to have newSize elements. Populate the vector with integers {newSize, newSize - 1, ..., 1}. Ex: If newSi
    6·1 answer
  • How to do or create a shepard tone using additive synthesis in Pure Data. Please help, desperate!!
    8·1 answer
  • 5. Javascript can be used for building apps and​
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!