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 place does the 3 have in 8.3
Ghella [55]
The 3 is in the tenths place
3 0
3 years ago
Read 2 more answers
Find the value of x
Vilka [71]
<span>An exterior angle of a triangle is equal to the sum of the opposite interior
angles  </span>⇒  x = 30 + 90 = 120°
6 0
3 years ago
What is the difference between points F (2,9) and G (4,14) round to the nearest whole number.
Sonbull [250]

Answer:

3,15

Step-by-step explanation:

took the test boi

7 0
3 years ago
The sum of a number and five is seventeen what is the number?​
RoseWind [281]
The number would be 12
4 0
3 years ago
Read 2 more answers
A man bought a refrigerator, an air conditioner, a TV set and a gas cooker for $150.00, $400.00, $180.00 and $300.00 respectivel
MaRussiya [10]

Answer:

1184.5

Step-by-step explanation:

150+400+180+300=1030

1030 × 15% = 154.5

(15% is also 0.15)

1030 + 154.5 = 1184.5

I hope this helps you :)

4 0
3 years ago
Other questions:
  • Why is 2-7 not equal to 7-2
    14·1 answer
  • What is the point of intersection of the x-axis and the y-axis called?
    7·2 answers
  • (you can zoom in) Can someone please explain why this is wrong?? ( Pythagorean theorem )
    6·2 answers
  • 10. An equation is shown. 5 1/2 + 5 1/? = 10 4/6<br>What is the value of the missing number?​
    11·1 answer
  • 20 POINTS AND BRAINLIEST !! PLEASE ANSWER THIS MATH QUESTION !!
    7·1 answer
  • Larry has 9 yards of fabric. He will use 2 yards to make each vest. How many vests
    11·2 answers
  • Which of these expressions has the greatest value?
    9·1 answer
  • Tatiana wants to give friendship bracelets to her 323232 classmates. She already has 555 bracelets, and she can buy more bracele
    13·1 answer
  • Please help!!!!!!!!!​
    15·1 answer
  • Identify the value of x that makes each pair of ratios equivalent.<br> 2:x and 12:18
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!