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
guapka [62]
3 years ago
12

Write a Java application that inputs a series of 10 integers and determines and prints the largest and smallest integer. Use a c

ounter-controlled while iteration.
Computers and Technology
1 answer:
klio [65]3 years ago
5 0

Answer:

import java.util.Scanner;

public class LargestSmallest {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.print("Enter 10 integers: ");

       int num = in.nextInt();

       int i = 1;

       int min = num, max = num;

       while (i < 10) {

           num = in.nextInt();

           if (num > max) max = num;

           if (num < min) min = num;

           i++;

       }

       System.out.println("Largest number: " + max);

       System.out.println("Smallest number: " + min);

   }

}

Explanation:

A Java application that inputs a series of 10 integers and determines and prints the largest and smallest integer is written above.

You might be interested in
if you put a drone on the charger at 8:12 and take a break at 10:03 how long is it on the charger. for
dalvyx [7]

Answer:

1 hour and 50 minutes

Explanation:

6 0
2 years ago
Freeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee points
kherson [118]

Answer:

how is this even possible. You are amazing

Explanation:

3 0
3 years ago
Read 2 more answers
What is the difference between render and draw in game programming?
leonid [27]
The way I've understood it in my programming classes, that rendering is the whole <span>process of transforming and lighting vertices, processing fragments, and filling in all necessary buffers, where the drawing is only the last step.

Hope this helps you. </span>
5 0
3 years ago
a password to a certain database consists of digits that cannot be repeated. if the password is known to consist of at least 8 d
BaLLatris [955]

Answer:

\frac{10!}{2}mins

Explanation:

12 seconds to try one combination will be equivalent to  \frac{1}{12}\times 60 = \frac{1}{5} \ mins

Password contain at least 8 digit i.e. password can contain 8, 9, 10 digit.

Password cannot contain more than 10 digit because it will give room for repetition which it is clearly stated that digit cannot be repeated.

Possible digit that can be used: 9,8,7,6,5,4,3,2,1,0.

Total number of passwords combination possible for each position in 8 digit.

1st position = 10, 2nd position = 9, 3rd position = 8, 4th position = 7, 5th position = 6, 6th position = 5, 7th position = 4, 8th position = 3. Total number of passwords combination possible in 8 digit is equivalent to \frac{10!}{2}.

Total number of passwords combination possible for each position in 9 digit.  

1st position = 10, 2nd position = 9, 3rd position = 8, 4th position = 7, 5th position = 6, 6th position = 5, 7th position = 4, 8th position = 3, 9th position = 2. Total number of passwords combination possible in 9 digit is equivalent to \frac{10!}{1}.

Total number of passwords combination possible for each position in 10 digit.

1st position = 10, 2nd position = 9, 3rd position = 8, 4th position = 7, 5th position = 6, 6th position = 5, 7th position = 4, 8th position = 3, 9th position = 2, 10th position = 1.  Total number of passwords combination possible in 10 digit is equivalent to 10!.

Adding them up and multiplying by  \frac{1}{5} \ mins  to get the total number of time needed to guarantee access to database =  [\frac{10!}{2}\times\ \frac{10!}{1} \times 10!] \frac{1}{5}\ mins = \frac{10!}{2}

7 0
4 years ago
(PLEASE HELP!! I'll award brainiest!!)
Bas_tet [7]

Answer:

Repair

Have a good day

3 0
3 years ago
Read 2 more answers
Other questions:
  • What kind of device is a printer? output or input
    13·1 answer
  • Write a short java method that takes an integer n and returns the sum of all the odd positive integers less than or equal to n.
    5·1 answer
  • What is a expansion card for computer?
    5·1 answer
  • Convert 42DB5000 base 16 to base 10 floating point form assuming this is a signed floating point encoding (IEEE754) (32-Bit)
    10·1 answer
  • Write an expression that prints 'You must be rich!' if the variables young and famous are both True. Sample output with inputs:
    9·1 answer
  • Being able to express your thoughts in an email is a primary technology skill. true or false.
    9·2 answers
  • Please answer that and i'll gave you branlliest
    15·1 answer
  • Which country has the most common features of analogue and digital computer​
    6·1 answer
  • Define a function calc_pyramid_volume with parameters base_length, base_width, and pyramid_height, that returns the volume of a
    12·1 answer
  • What is the purpose of secondary<br> memory?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!