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
How to use github to creat a blog?Thank you
stepan [7]
You can use GitHub Pages! They have tutorials on their site to help you set up using that (too much for this format!). You can use it to make your own personal site, as well as host any existing site you may have.
5 0
3 years ago
Smallest kind of computer
jeka57 [31]
I don’t know if i’m right but like Michigan Micro Mote ?
3 0
2 years ago
Read 2 more answers
Name all the keys of the home row.
Kaylis [27]

Answer:

Search key, a, s, d, f, g, h, j, k, l, : and ;, ¨ and ´, and the enter key.

5 0
3 years ago
Which statement describes a feature of Oracle sequences? Oracle sequences generate a character string that can be assigned to ta
mylen [45]

Answer:

An Oracle sequence uses the identity column property to automatically number rows.

Explanation:

An Oracle sequence is a tool that can be used to generate a number sequence. Oracle has the capacity to help you create an auto-number field by using one of its tools called sequence.

A sequence is an object in Oracle that is used to generate a number sequence for input to a table. This is required when you need to generate primary key values by the use of identity columns.

So, Oracle sequence can automatically number rows by the use of identity columns.

8 0
3 years ago
What is computer? what are the major function of computer​
Naya [18.7K]

Answer:

A computer is a machine that can be programmed to carry out sequences of arithmetic or logical operations automatically. Modern computers can perform generic sets of operations known as programs. These programs enable computers to perform a wide range of tasks.Computers are used to control large and small machines which in the past were controlled by humans. Most people have used a personal computer in their home or at work. They are used for things such as calculation, listening to music, reading an article, writing etc.

Computers are used at homes for several purposes like online bill payment, watching movies or shows at home, home tutoring, social media access, playing games, internet access, etc. ...

Medical Field. ...

Entertainment. ...

Industry. ...

Education. ...

Government. ...

Banking. ...

Business.

BRAINLIEST PLEASE

7 0
2 years ago
Other questions:
  • What precaution can you take while using a social networking site to prevent a data breach?
    15·1 answer
  • To determine what to study, one should first
    8·1 answer
  • PLEASE HELP!
    12·2 answers
  • The underwriters laboratories (ul) requirement for ? ground-fault circuit interrupters (gfcis) is that tripping shall occur when
    5·1 answer
  • Which of the following is the core of an operating system that maintains the computer’s clock, starts applications, and assigns
    5·1 answer
  • Tortise and hare race java g Modify the main class so it runs the race 100 times and reports how many times each runner wins. (T
    7·1 answer
  • What command should be executed to view the configuration of the nic?
    7·1 answer
  • Define input hardware​
    12·1 answer
  • Write a program that takes a string as an input. If the string entered is equal to
    9·1 answer
  • What does syntax error mean :-;<br>explain briefly.<br><br>thankyou!
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!