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
On a number line, a number, b, is located the same distance from 0 as another number, a, but in the opposite direction. The numb
stiks02 [169]
Y=kx is the equation for direct variation
8 0
3 years ago
Read 2 more answers
0.327 rounded to the nearest hundredths
daser333 [38]
.33 because the 2 needs to round up hecause there is a number greater than 5 after it
8 0
3 years ago
Read 2 more answers
Find the total surface area of the cylinder shown. Leave the answer in terms of π. A cylinder with radius 4.25 inches and height
olga_2 [115]

Answer:

87.125\pi in^{2} or 87\frac{1}{8}\pi  in^{2}

Step-by-step explanation:

Given Surface Area of Cylinder = 2\pi rh+2\pi r^{2},

and also given r = 4.25 inches and h = 6 inches.

Let's Substitute r and h into the formula to find the total surface area.

Surface Area of Cylinder = 2\pi (4.25)(6)+2\pi (4.25)^{2} \\=51\pi +36.125\pi \\=87.125\pi in^{2}  or 87\frac{1}{8} \pi in^{2}

5 0
2 years ago
What is the y-intercept of the line?<br><br> y= -2x - 8<br><br> y-intercept =
ivolga24 [154]

Like I said on the other question. Slope will ALWAYS be the number beside x and y-intercept will always be after that.

Slope-intercept form = y = mx + b

Slope goes where m is and y-intercept goes where b is.

Hope this helps!

3 0
3 years ago
Read 2 more answers
G(x) = -2? + 3<br> h(x) = 4x – 1<br> Find g(8) : h(8)
Sliva [168]

Answer:

Answer to Given the functions: 1 f (x)=4x g(x)= | x-3 1 h(x)= x+6 Evaluate the function (f-g)(x) for x=-6. (4-8)(-6) is DO Undefine...

3 0
3 years ago
Other questions:
  • If triangle RST and triangle XYZ are similar, which statement must be true?
    9·2 answers
  • Kristen needs at least 500 points to earn the next trophy on her video game. She has 418 points. How many points must she earn t
    7·2 answers
  • Round to the nearest ones place for the problem as follows......3.9
    9·2 answers
  • What does 0.2 = in halves
    9·1 answer
  • A family has two cars. The first car has a fuel efficiency of 30 miles per gallon of gas and the second has a fuel efficiency of
    13·2 answers
  • The school media specialist has catalogue 2/3 of the new books in a shipment. If she has catalogued 52 books, what is the total
    15·1 answer
  • Prove the following statements: (a) For every integer x, if x is even, then for every integer y, xy is even. (b) For every integ
    11·1 answer
  • PLEASE HELP PLEAAE HURRY ANS NO LINKS PLEASE I REALLY NEED THE ANSWER
    15·1 answer
  • y = 2x squared + 5x -3 can be written in the form y= 2( x+a) squared + b . Find the value of a and the value of b.
    14·1 answer
  • Solve the inequallity for x<br> -3x + 6 &gt; 48
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!