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
A group of eight people are attending the movies together.
sveta [45]

Answer:

I think A

Step-by-step explanation:

4 0
3 years ago
What are the coordinates of the point on the directed line segment from (-6, -10)
disa [49]
Straight line
Explaintion .
3 0
3 years ago
A kitten’s mass at birth was 0.09 kilogram. The kitten gained approximately 0.084 kilogram each week. After how many weeks is th
Naddika [18.5K]
A kitten’s mass at birth was 0.09 kilogram. The kitten gained approximately 0.084 kilogram each week. After how many weeks is the kitten’s mass 1.098 kilograms?
5 0
3 years ago
I need some more help, I will mark brainliest
Alexus [3.1K]
Download photo math, it helps quicker! step by step.
6 0
3 years ago
Find x❤❤<br><br> I Will mark brainliest who answer first
andre [41]

Value of x is 35°

Step-by-step explanation:

  • Step 1: Since the line segment is a perpendicular bisector, the angle formed is equal to 90° and two triangles are also formed.

Find x using the property of triangles that sum of angles of a triangle is 180°

⇒ x° + 55° + 90° = 180°

⇒ x° + 145° = 180°

∴ x = 180 - 145 = 35°

8 0
3 years ago
Other questions:
  • Is this the right answer....???????
    11·1 answer
  • Can someone help me solve these
    15·2 answers
  • For f(x) = 4x+1, what is the output for the input 5?
    10·1 answer
  • Can someone help me solve this geometry problem please :)
    11·2 answers
  • Help I need help on 4 help me as soon as possible and show me the equation
    6·1 answer
  • Does the point (1,10)satisfy the inequality y&lt;8x+2
    9·1 answer
  • Lamar deposited $2,008 in a savings account with simple interest. Six months later, he had
    14·1 answer
  • A bag of marbles includes only green and red marbles. The results of an experiment are shown in the table below. What is the exp
    14·1 answer
  • Pls help me guys I forgot how to do this :((((((
    5·2 answers
  • PLS HELP ME GRADUATE ILL MARK BRAINLY A-AND ILL GIVE U A COOKIE!!! PLS
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!