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
Write a description of how a diagram can help you solve 2×40
olya-2409 [2.1K]
Draw 40 boxes, and in a separate section draw another 40 boxes.
(If you have the time :) )
8 0
3 years ago
Read 2 more answers
What is the volume of the right prism 8 mm 18 mm 12 mm
lisabon 2012 [21]
It will be clearly  B.38mm3
7 0
3 years ago
7.)
I am Lyosha [343]

Answer:

The final temperature for the day was -16 degrees.

Step-by-step explanation:

6-12= -6

-6-10= -16

8 0
3 years ago
The scale on a map indicates that 1 inch corresponds to an actual distance of 95 miles. two cities are 4.5 inches apart on the m
arlik [135]
The two cities are actually 427.5 miles apart.
3 0
3 years ago
Rule add 15, subtract 10 first term4
mr Goodwill [35]
I think that would be 9 I am not sure.

8 0
3 years ago
Read 2 more answers
Other questions:
  • Can two numbers have a GCF that is bigger than their LCM? Explain how you know?
    5·1 answer
  • A number n is less than or equal to -7 or greater than 12.
    11·2 answers
  • Please help me with some Algebra 2. Last stretch of the trimester and it’s 3:13AM. It’s my own fault for getting myself into thi
    7·1 answer
  • I need the answer ASAP
    13·1 answer
  • Pleeeease help me do this assignment it would mean a lot! Thanks
    14·1 answer
  • Molly spent 1 hour and 30 minutes swimming 5 laps in the river. If it took her the same time to swim each lap, how long would it
    6·1 answer
  • In ΔSTU, s = 6.1 cm, t = 3.2 cm and u=7.4 cm. Find the measure of ∠S to the nearest 10th of a degree.
    9·2 answers
  • Solve by completing the square:<br> x^2 + 3x - 9 = 0
    10·2 answers
  • What is it<br><img src="https://tex.z-dn.net/?f=ee" id="TexFormula1" title="ee" alt="ee" align="absmiddle" class="latex-formula"
    11·1 answer
  • You have loaned a friend %100 and will charge him 5% annual simple interest when he pay it back.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!