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
Rus_ich [418]
3 years ago
13

5-11) (Find the Smallest Value) Write an application that finds the smallest of several integers. Write a program which first as

ks the user to enter the number of values to enter, then asks for each value, and finally prints out the lowest value of those entered.
Computers and Technology
1 answer:
Elanso [62]3 years ago
8 0

Answer:

import java.util.Arrays;

import java.util.Scanner;

public class num4 {

   public static void main(String[] args) {

   Scanner in = new Scanner(System.in);

       System.out.println("How many numbers? ");

       int n = in.nextInt();

       int []intArray = new int[n];

       //Entering the values

       for(int i=0; i<intArray.length;i++){

           System.out.println("Enter the numbers");

           intArray[i]=in.nextInt();

       }

       System.out.println(Arrays.toString(intArray));

       int min =intArray[0];

       for(int i =0; i<intArray.length; i++){

           if(min>intArray[i]){

               min = intArray[i];

           }

       }

       System.out.println("The Minimum of the numbers is "+min);

   }

}

Explanation:

  • Using Java programming language
  • Prompt the user for the number of values
  • Using Scanner class receive and store in a variable
  • Create an array of size n
  • Using an for loop continuously ask the user to enter the integers
  • Print the array of integers
  • Using another for loop with an if statement, find the smallest element in the array of numbers
  • Output the the smallest number
You might be interested in
He made me so angry when he didn’t let me make my point that I had to stalk after him.
madam [21]

Answer:

21

Explanation:

because

4 0
3 years ago
Read 2 more answers
The term packet is used fairly generically to refer to protocol data unit (PDU). There are PDU equivalent names in the different
Westkost [7]

Answer:

Bits

Explanation:

The protocol data unit is the representative unit of data in the OSI layer of a network. The OSI system has seven layers.

The physical layer is the first layer of the system and the protocol data unit is represented as bits of data.

Note that the term packet is the PDU for data in the network layer of the OSI network system.

4 0
2 years ago
How to convert 23.125 to binary (Hex) using the double - precision representation
Svet_ta [14]

Answer:-

(10111.001)₂

Explanation:

To convert a decimal number to a binary number we have to constantly divide the decimal number by 2 till the decimal number becomes zero and the binary number is writing the remainders in reverse order of obtaining them on each division.

Hence the binary number is 10111.001

To convert binary to hexa decimal we to make a group 4 binary bits starting from the decimal and moving outwards if the last group is not of 4 then add respective 0's and write the corresponding hexa decimal number.

<u>0001</u>  <u>0111</u> . <u>0010</u>

   1        7         2

Hence the hexadecimal number is 17.2

6 0
2 years ago
Components of an operating system include process,memory,and file management. what is another component of and operating system
kirza4 [7]

Answer:

Wrong it's actually C.

Explanation:

APEX

4 0
2 years ago
Read 2 more answers
Which of the following formats allow visual, video, and sound capability and can be uploaded to certain social networking sites?
insens350 [35]
It is Microsoft work
This is because
6 0
3 years ago
Other questions:
  • Before responding to an e-mail from another student in an online course, a student should
    13·2 answers
  • Your computer is configured to obtain an ipv4 address and dns server address automatically. what utility will help you to find t
    7·1 answer
  • You disassemble and reassemble a desktop computer. when you first turn it on, you see no lights and hear no sounds. nothing appe
    11·2 answers
  • Given: The following if statement uses an overloaded &gt; operator to determine whether the price of a Car object is more than $
    5·1 answer
  • Before his job interview, Shabnam took the time to carefully wash and iron his best khaki pants and a button-down shirt. He even
    15·2 answers
  • Which of the following statements is correct?
    11·1 answer
  • Exercise 4: Bring in program grades.cpp and grades.txt from the Lab 10 folder. Fill in the code in bold so that the data is prop
    12·1 answer
  • What is the correct order of the phases of the software development process?
    14·1 answer
  • QUESTION 10
    10·2 answers
  • How many levels of heading tags are allowed in html?
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!