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
Helppppp needed plz quick
olga nikolaevna [1]

Answer:

Step-by-step explanation:

9x - 77 = 7x - 43

2x - 77 = -43

2x = 34

x = 17

9(17) - 77 = 153 - 77 = 76

7(17) - 43 = 119 - 43 = 76

z + 76 = 180

z= 104

4 0
3 years ago
HELP MATH
aleksley [76]

Answer:

18.84 is the answer

Step-by-step explanation:

Can I please be marked as brainlist

8 0
3 years ago
What is 7C3? Thanks.
Lerok [7]

Answer:

C7,3=7!( 3!)( 7−3)!= 7! I think tell me if I'm wrong?

8 0
2 years ago
Read 2 more answers
a yard width is 2 less than it's length. If the perimeter of the yard is 20 feet determine the length and the width of the yard
Arte-miy333 [17]

Answer:

The length is 6 feet and the width is 4 feet

Step-by-step explanation:

Let x represent the length of the yard

The width can be represented by x - 2, since it is 2 less than the length.

Use the perimeter formula, P = 2l + 2w, where l is the length and w is width

Plug in the expressions and perimeter:

20 = 2x + 2(x - 2)

Solve for x:

20 = 2x + 2x - 4

20 = 4x - 4

24 = 4x

6 = x

So, the length is 6. Plug this into x - 2 to find the width

x - 2

6 - 2

= 4

So, the length is 6 feet and the width is 4 feet

5 0
2 years ago
Find the percent decrease. Round to the nearest percent.<br><br><br> From 90°F to 70°F
Goryan [66]

Answer:

22

Step-by-step explanation:

90*x = 70

x = 7/9

x = 78%

100-78 = 22

3 0
2 years ago
Other questions:
  • B(t)=50(1.4)^t
    8·1 answer
  • At a local Chamber of Commerce, there are 8 men and 7 women present for an executive election of a president, vice-president and
    15·1 answer
  • Solve 3=5^(x+1) using change of base
    8·1 answer
  • If a son is 16 years and his father is 27 year older, how old will his father be?​
    8·2 answers
  • What is the standard form of this function? f(x) = -(x − 4)2 + 2 A. f(x) = -x2 + 4x − 30 B. f(x) = x2 + 8x − 14 C. f(x) = -x2 +
    7·2 answers
  • In the figure, m∠1=m∠2 = 22 and m∠3 = m∠4 = 123. Find m∠TSK.
    15·2 answers
  • 172 (-167) (-10) (-144)
    5·1 answer
  • 60,000 is one tenth of
    9·1 answer
  • A woman drives an SUV that get 13 miles per gallon (mpg). Her husband drives a hybrid that’s gets 60 mpg. Every week, they trave
    11·1 answer
  • IDK- PLS HELP ME plss
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!