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
What is a killer app??
mars1129 [50]
Application of a new technology and is much superior to rival products
6 0
3 years ago
Read carefully, is it a he or she?
Tasya [4]
I think there's a typo in the question, otherwise they probably meant a 'she', since the name is Maureen.

Also, the answer is Personal hygiene and grooming.
6 0
3 years ago
Read 2 more answers
How are you doing this fine morning <br><br> hi
notka56 [123]
It's evening................∆
6 0
3 years ago
Read 2 more answers
write a python function that takes string j and returns a dictionary showing number of letters and digits in j. The returned dic
k0ka [10]

Explanation:

def letterDigitCount(j):

dic={"digits":0,"letters":0}

for a in j:

if a.isdigit():

dic["digits"]+=1

elif a.isalpha():

dic["letters"]+=1

return dic

3 0
3 years ago
Uso de las redes sociales como el uso de una impresora en casa se satisfacen estás tres etapas
Svetradugi [14.3K]

Question: what question is this?

7 0
2 years ago
Other questions:
  • Describe the difference between Global knowledge and personal idea. Why is it important to give credit to others by citing their
    6·1 answer
  • How does an employer judge a candidate?<br> The employer judge's the candidate's ? for a job.
    12·1 answer
  • The box plot represents this data set. {16, 16, 16, 18, 18, 20, 24, 28, 30, 34} What value does the letter A represent on the bo
    8·2 answers
  • In order to plan George’s birthday, his father gave him a list of people who attended his birthday for the last five years. What
    8·1 answer
  • While surfing online, Patricia checks her email and reads the latest messages. She then browsers a website and logs in a comment
    8·1 answer
  • Number Array Class
    5·1 answer
  • Data aggregate functions
    6·1 answer
  • Nicotine us a dangerous chemical found in Cigarettes; it is accompanied by two other very harmful chemicals. These are
    15·1 answer
  • Which of the following tabs on the Ribbon contains the command to add a Quick Part to a document? A Design B Insert C View D Hom
    7·1 answer
  • How to edit slides into video.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!