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
Question 6 options: This is a category or partitioned group of the small units of a programming language include its numeric lit
Wittaler [7]

Lexeme is a category or partitioned group of the small units of a programming language include its numeric literals, operators, and special words.

<h3>What is a lexeme in programming?</h3>

Lexemes are known to be those character strings that are put together from the character group of a program, and the token stands for what aspect of the program's grammar they are made of.

Hence, Lexeme is a category or partitioned group of the small units of a programming language include its numeric literals, operators, and special words.

Learn more about Lexeme from

brainly.com/question/14125370

#SPJ1

6 0
2 years ago
How do u know when a website doesnt like u?
stira [4]
Honest answer a website does not have feelings so therefore there is no way to tell if a website likes you or not!! The reason it may not load is because your IT provider or maybe to firewalls that are set up on your modem. Sometimes its not that and you just need to keep you computer up to date that way it can get on the websites! Hope i helped
3 0
4 years ago
Convert the following decimal numbers into binary numbers. <br><br>pls ASAP<br>​
Anna007 [38]

Explanation:

Given, the cost price of the TV is Rs 24600. Now, the cooler costs Rs 800 more than one-third of the TV. The cost price of the cooler is Rs 9000.

6 0
3 years ago
A thermogram taken outside a house shows high amounts of thermal energy around the windows but not around the roof. which conclu
mestny [16]

The conclusion sustains the thermogram will be that the windows are not energy efficient, but the roof stands energy efficient.

<h3>What is Thermography?</h3>

Thermography exists a noninvasive method that employs an infrared camera to develop pictures that depict patterns of heat and blood flow on or around the body's surface. A thermogram taken outside a house shows high quantities of thermal energy around the windows but not around the roof. The conclusion that supports the thermogram will be that the windows are not energy efficient, but the roof exists energy efficient.

Thermal energy (also named heat energy) is produced when a rise in temperature pushes atoms and molecules to move faster and collide with each other. The energy that reaches the temperature of the heated substance is named thermal energy. The term "thermal energy" exists utilized loosely in various contexts in physics and engineering. It can guide several different well-defined physical concepts.

To learn more about Thermography refer to:

brainly.com/question/1500896

#SPJ4

The complete question is,

A thermogram taken outside a house shows high amounts of thermal energy around the windows but not around the roof.

Which conclusion supports the thermogram?

The windows and the roof are energy efficient.

The windows and the roof are not energy efficient.

The windows are not energy efficient, but the roof is energy efficient.

The windows are energy efficient, but the roof is not energy efficient.

4 0
1 year ago
Pros and cons of the inter's<br> ability to access information
SpyIntel [72]
Pros and cons of the internet are the pros you can get the informaqtion needed to research and find out any information at your finger tips and get the answerws you need to certqin things fast. The cons the main one ise the people who misuse this to st4eal your information and indenity.
7 0
4 years ago
Other questions:
  • Can someone fix this so that it only says "its a payday" on 15 and 30 and on all other days "sorry, it's not payday"
    9·1 answer
  • This solution will use an item quantity and a state code to calculate the total price of an item. The solution will calculate th
    10·1 answer
  • ................njkkjjiooiuuuu
    6·1 answer
  • Changes in computer technology have an effect on _____. computer scientists only people who work with computers only everybody p
    12·2 answers
  • Help!!! Who is this? Who is it from?
    14·2 answers
  • What should you wear during lab investigations to protect your eyes?
    5·1 answer
  • Write a try block in which you prompt the user for an integer and display the name in the requested position in the names array.
    11·1 answer
  • What does an upright (straight) body posture convey or show? [ ]
    10·1 answer
  • Create 2 methods of your choice.
    5·1 answer
  • An engineer has reported that a printer is no longer working and needs troubleshooting. You have been informed that there is a p
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!