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]
4 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]4 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 are movies filmed before 1990's?
natita [175]

Answer: Once Upon a Time in the West (1968) PG-13 | 165 min | Western. ...

Cinema Paradiso (1988) R | 155 min | Drama. ...

Blade Runner (1982) R | 117 min | Action, Sci-Fi, Thriller. ...

2001: A Space Odyssey (1968) G | 149 min | Adventure, Sci-Fi. ...

Apocalypse Now (1979) ...

Chinatown (1974) ...

Stardust Memories (1980) ...

Le Notti Bianche (1957)

Explanation:

8 0
3 years ago
Where might the Null Object pattern be useful?
Tanzania [10]

Answer:  Null Object pattern be useful when the absence of an object can be encapsulated by other alternatives which does not have any have any effect.

Explanation:

public interface Rectangle {

double area();

   double surfaceare();

   boolean isNull();

}

In the code above we have a function for null object. So in the absence of an object we have encapsulated with a method of null which does not do anything. It simplifies the use of dependencies that can be undefined.

In case of collaborator the NULL object pattern makes use of the existing collaboration instead of defining a new one.

It also enable to abstract the handling of null objects from the client so that internal details of the program are not know to outsiders.

5 0
3 years ago
Although a variety of different styles of documentation exist for report preparation, each style requires the same basic informa
BARSIC [14]
I would say the statement given above is true. <span>Although a variety of different styles of documentation exist for report preparation, each style requires the same basic information. Hope this answers the question. Have a nice day.</span>
3 0
4 years ago
1. Where is the HTML tag display, and why do you think it is important to include on your web page.
katen-ka-za [31]
        A title tag is an HTML element that specifies the title of a web page. They are displayed on a search engines result page. They are important for usability, SEO, and social sharing.

 

Got some of this info from a website.(Link down below)
https://moz.com/learn/seo/title-tag

                               Hope this helps.

 

5 0
4 years ago
Which SQL command must be used when you are using a function (like SUM or COUNT) in a Select statement (like COUNT (CustomerID))
soldier1979 [14.2K]

Answer:

Having.

Explanation:

When we are working with Select statements like COUNT(CustomerID).We should use Having clause because functions like (SUM,COUNT,AVG etc) are aggregate functions and we cannot use where clause with aggregate functions.That's why we use Having clause with aggregate functions.

for example:-

select COUNT(CustomerID),state_of_residence

from Customers

GROUP BY state_of_residence

HAVING COUNT(CustomerID)>10;

6 0
3 years ago
Other questions:
  • Using Matlab programming I need to rotate the line defined by x,y by 45 degrees around 2,2
    13·1 answer
  • Whenever I try to take a picture of a question on brainly it says “oops something went wrong try again in a while”. Is anybody h
    12·2 answers
  • Lisa managed incident response for a bank. The bank has a website that’s been attacked. The attacker utilized the login screen,
    9·1 answer
  • What is the function of the NOS? Select all that apply.
    5·2 answers
  • Which contact field is used to control the name that would appear in the To field of an email message when a user is sending a m
    5·2 answers
  • Write a program that declares a two-dimensional array named myFancyArray of the type double. Initialize the array to the followi
    12·1 answer
  • A data analyst adds descriptive headers to columns of data in a spreadsheet. How does this improve the spreadsheet?.
    8·1 answer
  • Complete the statement below with the correct term.
    12·1 answer
  • How to solve level 53 on rapid router?
    11·1 answer
  • Which steps of the management science process can either be a recommended decision or information that helps a manager a decisio
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!