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
After 4th collision in ethernet, find the maximum time that the adapter waits until sensing the channel again for a 100 mbps bro
VARVARA [1.3K]

Waiting time for a 100 Mbps broadcast channel is 0.512 ms

Recall that with the CSMA/CD protocol, the adapter waits K * 512 bit times after a collision,

where K is drawn randomly. For K = 100,

The one bit time for 10 Mbps is 1/10000000 s = 0.0001 ms

The one bit time for 100 Mbps is 1/100000000 s = 0.00001 ms

Waiting time for a 10 Mbps broadcast channel is K*512*0.0001= 5.12 ms

Waiting time for a 100 Mbps broadcast channel is K*512*0.00001= 0.512 ms

<h3>What is a collision in Ethernet?</h3>
  • A collision happens on a half-duplex Ethernet network when two devices on the same network attempt to communicate data at the exact same time.
  • The two transmitted packets are "collapsed" by the network, which results in the network discarding both of them.
  • On Ethernets, collisions are unavoidable.
  • A collision is a momentary interaction between two bodies or more than two bodies at once that modifies the motion of the bodies involved as a result of the internal forces at work.
  • Collisions entail the application of force (there is a change in velocity).

Learn more about collision in Ethernet: brainly.com/question/14123270

#SPJ4

3 0
2 years ago
A(n) ______________________________ is a camera mount that uses the concept of a lever and fulcrum and allows a camera to be rai
rewona [7]
Hey and thanks for giving me the chance to serve u
_________________tripod 
_______________
hope l helped
4 0
3 years ago
Write a method named numUnique that accepts a sorted array of integers as a parameter and that returns the number of unique valu
SVEN [57.7K]

Answer:

The method in Java is as follows:

public static int numUnique(int list[]) {  

int unique = 1;  

for (int i = 1; i < list.length; i++) {  

 int j = 0;  

 for (j = 0; j < i; j++) {

  if (list[i] == list[j])  

   break;  

 }

 if (i == j)  

  unique++;  

}  

return unique;  

}  

Explanation:

This line defines the numUnique method

public static int numUnique(int list[]) {

This initializes the number of unique elements to 1

int unique = 1;  

This iterates through the list

for (int i = 1; i < list.length; i++) {

The following iteration checks for unique items

 int j = 0;  

<em>  for (j = 0; j < i; j++) { </em>

<em>   if (list[i] == list[j]) </em><em>If current element is unique, break the iteration</em><em> </em>

<em>    break;  </em>

<em>  } </em>

 if (i == j)  

  unique++;  

}

This returns the number of unique items in the list

return unique;  

}  

3 0
3 years ago
Which file contains full and incremental back-up information for use with the dump/restore utility?
Ivahew [28]

The file that contains full and incremental back-up information for use with the dump/restore utility is <u>/etc/dumpdates.</u>

<u></u>

<h3>What is dump/restore utility ?</h3>

Dump examines files in a filesystem, determines which ones need to be backed up, and copies those files to a specified disk, tape or other storage medium. Subsequent incremental backups can then be layered on top of the full backup.

The restore command performs the inverse function of dump; it can restore a full backup of a filesystem. Single files and directory subtrees may also be restored from full or partial backups in interactive mode.

Learn more about incremental backups

brainly.com/question/5849057

#SPJ4

3 0
2 years ago
Check the devices that are external peripheral devices:
irina [24]

Answer:

Mouse, and keyboard

Explanation:

Common Sense

6 0
3 years ago
Other questions:
  • What is the last step when supervising detainee operations ssd1?
    14·1 answer
  • Operating systems the most common form Microsoft windows in Mac OS discuss the similarities and differences between which two sy
    13·1 answer
  • The shortest-route technique would best be used to determine the amount of LAN network wiring within a building. determine the p
    12·1 answer
  • Who invented autonomous cars? When I look it up it comes up as William Bertelsen but he invented the idea of hovering cars. Help
    8·1 answer
  • Two advantages of Internet are ?​
    7·2 answers
  • Raj’s computer just crashed and he lost most of his files. What should he do to avoid this problem in the future?
    10·2 answers
  • Write a program in java to enter a character.The program displays the message "uppercase vowel" if entered character is uppercas
    5·1 answer
  • alexa is scanning a photograph whitch mode should she use A green tone B blue tone C greyscale D sepia ​
    15·2 answers
  • Where does Reiner take eren after they have a fight?
    7·2 answers
  • Type the correct answer in the box. Spell all words correctly. Kenny is designing a document for the employee motivation campaig
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!