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
kondaur [170]
3 years ago
14

Largest of five (5 points). Write an algorithm that read 5 distinct integers and displays the largest value. Assume the input va

lues are distinct integers. % java LargestOfFive 17 23 5 1 6 23 % java LargestOfFive 8 3 -8 4 1 8
Computers and Technology
1 answer:
mrs_skeptik [129]3 years ago
6 0

Answer:

import java.io.*;

public class Larger {

  public static void main(String[] args) throws IOException{

       BufferedReader br=new BufferedReader(new InputStreamReader(System.in));// reading input from buffered reader

        int a,max=-99999,i;

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

        {

            a=Integer.parseInt(br.readLine());//converting string input string to int

            if(a >max)

               max=a;

         

        }

       System.out.println("Maximum value : "+max);

  }

Explanation:

You might be interested in
_____ remove the part of an image starting from an edge​
Lapatulllka [165]
I think it’s cropping could be wrong though
4 0
3 years ago
Dominic list his camera for sale on an online auction site Chloe is the highest bitter and purchase as the camera how does the a
ludmilkaskok [199]

Answer: Dominic would pay a small fee to the auction site.

4 0
3 years ago
The term “computer literacy” dates back to what decade? <br> 1960s<br> 1970s<br> 1980s<br> 1990s
NNADVOKAT [17]
1970-80s which is when some of the first computers were created like apple computers which looked like a giant cube and a rectangle on the side which is very different than what we have today.

Hope this helps!
3 0
3 years ago
Which source would provide the best way to find valid information about climate change
igor_vitrenko [27]
Primary sources would be best
4 0
2 years ago
Assume you're using a three-button mouse. To access shortcut menus, you would
irina1246 [14]
If you are using the three-button mouse, in order to access the shortcut menus, you would right click the mouse. 
If you right click your mouse, it will show shortcut menus that can be easily accessed.
5 0
2 years ago
Other questions:
  • What is tuple and attribute of a relation​
    11·1 answer
  • Is a way of grading web pages by the number of other web pages that link to them?
    10·1 answer
  • Which of the following is a narrative essay most like?
    10·2 answers
  • A user calls you and says that when they try to connect to the internal website, they are prompted for authentication. The user
    14·1 answer
  • "You have installed a point-to-point connection using wireless bridges and Omni directional antennas between two buildings. The
    8·1 answer
  • Which operating system (OS) is used to run your laptop?
    15·2 answers
  • Describe the different
    12·1 answer
  • the image on the right was prooduced by a computer. it shows a complex molecu;e consisting of many atoms. what would be an advan
    6·1 answer
  • A statement that starts with a # symbol is called
    8·1 answer
  • A message is sent to all hosts on a remote network. Which type of message is it?.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!