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
Helen [10]
3 years ago
15

Write a program that displays the smallest of five input values that may include duplicate values (e.g., 6, 4, 8, 6, 7). Hint: R

eview the four solutions in the smallest number case study in this chapter. Consider how easy or hard it would be to modify each of those algorithms to find the smallest of five rather than three values. Then modify the algorithm you consider most appropriate for this problem.
Computers and Technology
1 answer:
Tpy6a [65]3 years ago
3 0

Answer:

Here the code is given as follows,

Explanation:

Code:-

import java.util.*;

class Chegg {

 

   public static void main(String args[])

   {

       Scanner sc=new Scanner(System.in);

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

       int arr[]=new int[5];

       int min;

       for(int i=0;i<5;i++)

       {

           arr[i]=sc.nextInt();

       

       }

       min=arr[0];

       for(int i=1;i<5;i++)

       {

           if(arr[i]<min)

           {

               min=arr[i];

           }

       }

       System.out.println(min);

   }

}

You might be interested in
If an element is nested within another element, what happens to each line of the nested element?
Elden [556K]

Nested elements are elements that are placed within another element.

When an element is nested within another, all lines of the nested element will <em>inherit </em>the <em>properties </em>of the parent element.

Take for instance, the following HTML code

<em><p align = "center"> I am a <b>boy</b> </p></em>

In the above HTML code,

The bold element (i.e. <b>) is nested in the paragraph element (i.e. <p>)

The paragraph element is aligned center.

This means that, all elements in the paragraph element (including the <em>bold element</em>) will be centralized.

Hence, all lines of a nested element will <em>inherit </em>the properties of the parent element.

Read more about nested elements at:

brainly.com/question/22914599

7 0
3 years ago
Answer this correct and get brainly
Leya [2.2K]

Pseudocode:

import random

fetch user input on a lucky number

insert input into variable - "response"

new variable, random = randint

condition to check wheather random is our response

display results

Python Code:

import random

def main():

response = int(input("Guess my lucky number, its between 1 and 100: "))

lucky_number = random.randint(1,100)

if response == lucky_number:

print(f"Wow you're right, it is {lucky_number}")

else:

print("Sorry, Try Again")

main()

Reminder:

intended for python3 as i included the format f

also it could be done without the import, just manually insert a number

i'll leave the post mortum to you

5 0
3 years ago
Read 2 more answers
Compare the encryption algorithms found in s-tools: idea, mdc, des, and 3des.
grin007 [14]
Are their answer chocies 

3 0
4 years ago
What lists the parts of the report and the pages they are on?
Bezzdna [24]

Answer:

Table of Contents

Explanation:

The list at which all the titles of chapters, and different parts of reports such as diagrams, pictures, tables, and headings along with their page numbers is called table of contents.

7 0
3 years ago
What are table buffers?
laiz [17]

Answer:

Table buffers are tools used to avoid the process of accessing a database in servers.

4 0
3 years ago
Other questions:
  • Krista needs to configure the default paste options in PowerPoint 2016. Which area of the Options dialog box will she need to us
    14·1 answer
  • What does this mean?
    7·2 answers
  • Transcoding digital videos does not cause a loss of quality. <br> a. True <br> b. False
    9·1 answer
  • How to create a delete button in Python?
    15·1 answer
  • Explain the four basic operation performed by every computer​
    11·2 answers
  • Why have the 'taskmasters' been answering questions so long but they're still only at the ambitious rank?
    14·1 answer
  • 1. Landscapes are the one type of photograph in which you should always use the traditional perspective.
    15·2 answers
  • Varied amount of input data Statistics are often calculated with varying amounts of input data. Write a program that takes any n
    8·1 answer
  • Write c++ program from 1to 100 to find prime numbers using statement.​​
    13·1 answer
  • Write a program, using case statements, that mimics a calculator. The program should take as input two integers and the operatio
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!