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
Vesna [10]
2 years ago
14

JAVA

Mathematics
1 answer:
Oksi-84 [34.3K]2 years ago
3 0

The program is an illustration of loops

<h3>What are loops?</h3>

Loops are program statements that are used to execute repeated statements

<h3>The java program</h3>

The program, written in Java where comments are used to explain each line is as follows:

import java.util.*;

public class Main{

public static void main(String[] args) {

 Scanner input = new Scanner(System.in);

 int num;

//Get input from the user

 num = input.nextInt();

//Initialize the largest to the first input

 int maxn = num;

//This loop is repeated until a negative input is recorded

 while (num >=0){

//If the current input is greater than the previous largest

     if (num>maxn){

//Set largest to the current input

         maxn = num;      }

//Get another input from the user

     num = input.nextInt();

 }

//Print the largest

 System.out.print("Largest: "+maxn);

}

}

Read more about loops at:

brainly.com/question/14284157

You might be interested in
What is the distance between (-5, -5) and (-9, -2)?
oee [108]

Answer:

The distance between the two should be -7

Step-by-step explanation:

Since you have to use d =

d =  \sqrt{(x2 - x1) { }^{2} }  \ + (y2 - y1) {}^{2}

5 0
3 years ago
Can I get him with all the questions please?
lara [203]

Answer:

14.16\\15. a) 14

Step-by-step explanation:

14. We\ are\ given\ that,\\The\ assumed\ number\ x\ is\ 4\ more\ than\ 12\\Hence,\\x=4+12\\x=16\\Lets\ see\ that\ x=16\ as\ a\ solution,\ matches\ with\ the\ other\ information\ provided.\\We\ are\ also\ given\ that,\\x13, 16\ is\ greater\ than\ 13\ too.\\x

15. a)\\Let\ the\ assumed\ no.\ be\ y\\Here,\ we\ are\ given\ the\ following\ information\ about\ y:\\y>10,\\y12\\y13,\\y=14

5 0
3 years ago
Plz help me can you explain to me have to work this problems.
Amanda [17]
Is This Elementary School HomeWork Or High School HomeWork
8 0
4 years ago
Read 2 more answers
[PICTURE ATTACHED] HEELPP!
liraira [26]

Answer:

saving money

Step-by-step explanation:

it wouldn't be none with repaid yet!

8 0
3 years ago
Read 2 more answers
Rewrite the following survey question to remove any bias:
bulgar [2K]

Answer:

which do you prefer going, English or math class.

Step-by-step explanation:

4 0
3 years ago
Other questions:
  • A coin is tossed and a number cube is rolled. What is the probability that the coin shows heads and the number cube shows 5? A.
    13·2 answers
  • A driveway is 40 yards long. About how many meters long is it?
    11·2 answers
  • i need some help. There are 96 strawberries in a basket. Each of 12 children received an equal number of the strawberries. Which
    14·1 answer
  • What is the volume of a sphere with radius of 16 inches?
    13·2 answers
  • Excuse the quality but plz help
    6·2 answers
  • I need help with 25 and 26
    9·1 answer
  • As of 01 January 2017, Delta mainline aircraft fly to 233 destinations; when combined with its Delta Connection
    7·2 answers
  • maria wanted to invest $10,000 at the bank. she invested part of her money in a cd account paying 2.1% simple interest and inves
    13·1 answer
  • The price of the tennis racket was 200 dollars. However, the actual price of the tennis racket was 400 dollars. What is the perc
    9·1 answer
  • I'll mark branliest !!!
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!