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
Find f( -7) if f(x) = 3 - 2x. <br> Which relation describes a function?
Dahasolnce [82]

Answer:

The answer is 17

A function is a relation in which each possible input value leads to exactly one output value. For example, we say “the output is a function of the input.”

Step-by-step explanation:

f(-7)=3-2x

3-2(-7)

3 - -14= 17

4 0
3 years ago
CAN SOMEONE HELP ME;(
Alja [10]

Answer:

answer is -2.3

Step-by-step explanation:

Hope this helps you out

4 0
3 years ago
Scarlett knits 2 centimeters of scarf each night. How many nights will
lorasvet [3.4K]

Answer:

3 nights

Step-by-step explanation:

let n equal the number of nights

6 = 2n  ---> 6 cm = 2 cm x the number of nights

6/2 = 2n/2 ---> divide both sides of the equation to isolate n

3 = n ---> number of nights equals 3

6 is the number of centimeters needed divided by 2 the number of centimeters per night which would give you the number of nights.

8 0
3 years ago
A 10 foot tree create a shadow that is 15 feet long. Find the angle of elevation of the sun
Solnce55 [7]

Answer:

The angle of elevation of the sun is 33.7⁰

Step-by-step explanation:

let the height of the tree, T = 10 foot

length of the shadow created by the tree, B = 15 feet long

Height of the tree and the shadow of the tree forms a right angle triangle with the remaining side that joins the two which is known as hypotenuse.

Let the remaining side, hypotenuse, L = ?

Apply Pythagoras theorem;

L ² = T² + B²

L ² = 10² + 15²

L ² = 325

L = √325

L = 18.03 ft

The angle of elevation of the sun, is the angle facing the height of the tree with the length of the shadow of the tree as adjacent of the triangle.

Let the angle of elevation = θ

tan θ = opp / adj

tan θ  = 10 / 15

tan θ  = 0.66667

θ = tan ⁻¹ (0.66667)

θ = 33.7⁰

Therefore, the angle of elevation of the sun is 33.7⁰

5 0
3 years ago
Which set contains only whole numbers divisible by 6?
lidiya [134]
SetY={6,24,36,78,84}
8 0
3 years ago
Read 2 more answers
Other questions:
  • Perform the indicated operation. 3m-6/4m+12*m^2+5m+6/m^2-4
    9·1 answer
  • Pls help i have 2 minutes find length
    5·2 answers
  • Which is the highest value? 1/100, 1/400,1/500
    7·2 answers
  • Equation represents table
    7·1 answer
  • 1. Giles thinks that -5x²(3x - 4) simplifies to 15x² + 20x². Explain what mistakes he made. What is the
    10·1 answer
  • Write the slope-intercept form of an equation that passes
    13·1 answer
  • PLS HELP ME PLS PLS
    5·1 answer
  • Gabi tried to solve an equation step by step. \qquad\begin{aligned} 0.1(0.5m+6)&amp;=2\\\\ \\ 0.5m+6&amp;=20&amp;\green{\text{St
    13·1 answer
  • Help please!!! Thanks
    7·1 answer
  • What is the system of inequalities associated with the following graph?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!