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
Which command group on the Slide Master tab is used to add headers, footers, and other placeholders to the slide
Vikki [24]

Answer:D

Explanation:

7 0
2 years ago
Read 2 more answers
A(n) __________ is a device or software that is designed to block unauthorized access while allowing authorized communications.
Lunna [17]

The answer to this question is a firewall. A Firewall is a network security system that blocks and prevent unauthorized use or access of company’s network. Firewall is also a program that screens and restricts viruses and other users like hackers to reach the network through the internet. 

3 0
3 years ago
Design a 128KB direct-mapped data cache that uses a 32-bit address and 16 bytes per block. The design consists of two components
Kitty [74]

Answer:

See the attached pictures for detailed answer.

Explanation:

The cache contain 8K number of blocks.each block has 16 Byte worth of data. Each of these bytes are addressable by block offset. Now, each of these blocks are addressable and their address is provided by line offset or set offset. If block number is given in Decimal format then the block to which that block will be mapped is given by expression

mappedToBlock = (bNumber)mod2​​​13

TAG and valid but consititues something called cache controller. TAG holds the physical address information because the TAG in physical address get divided into TAG and line offset in cache address. Valid bit tells status of blocks. If it is 1 then data blocks are referred by CPI else not.

7 0
3 years ago
Complete the function ending_time that determines the final clock time after a task has been completed. The function takes three
Ivanshal [37]

Answer:

  1. def ending_time(hour, minutes, seconds, work_time):
  2.    if((seconds + work_time) // 60 > 0):
  3.        minutes = minutes + (seconds + work_time) // 60
  4.        seconds = (seconds + work_time) % 60    
  5.        if(minutes // 60 > 0):
  6.            hour = hour + (minutes // 60)
  7.            minutes = minutes % 60
  8.    else:
  9.        seconds = seconds + work_time  
  10.    return str(hour) + ":" + str(minutes) + ":" + str(seconds)
  11. print(ending_time(2,30,59, 12000))

Explanation:

The solution code is written in Python 3.

Firstly create a function ending_time that takes the four required input parameters.

Next, create an if statement to check if the numerator of (seconds + work_times) divided by 60 is over zero. If so, increment the minute and reassign the remainder of the seconds to the variable (Line 2-4).

Next, create another if statement again to check if the numerator of (current minutes) divided by 60 is over zero, if so increment the hour and reassign the remainder of the minutes to the variable (Line 6-8)

Otherwise, just simply add the work_time to the current seconds

At last return the time output string (Line 12).

8 0
3 years ago
Write a python program to calculate the sum of three numbers and as well require the user to input the numbers.​
beks73 [17]

Answer:

numbers = []

for i in range(3):

 numbers.append(eval(input("Enter number: ")))

print('Sum is:', sum(numbers))

Explanation:

You want to use a loop to prevent repeating your code.

8 0
2 years ago
Other questions:
  • Earthquakes with magnitudes between 1.0 and 2.9 on the Richter scale are
    11·1 answer
  • Which of the following is the net effect of the following combination of share and NTFS permissions when the share is accessed o
    7·1 answer
  • _____________ data is what is translated to digital format so it can be stored in a computer.
    10·1 answer
  • A real-world problem that might be explained or predicted through the creation of a computer simulation
    7·1 answer
  • What are the pasting options in Outlook 2016? Check all that apply.
    10·2 answers
  • Which of these has an onboard key generator and key storage facility, as well as accelerated symmetric and asymmetric encryption
    10·1 answer
  • Gmod how to make someone admin on a lan server
    6·2 answers
  • You want to divide the value in cell D3 by the value in cell E3. Which formula should you use?
    11·2 answers
  • What command displays detail information about the OSPF interfaces, including the authentication method?
    7·2 answers
  • Write a program that will read two floating point numbers (the first read into a variable called first and the second read into
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!