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
viktelen [127]
2 years ago
6

Given five positive integers, find the minimum and maximum values that can be calculated by summing exactly four of the five int

egers. Then print the respective minimum and maximum values as a single line of two space-separated long integers.
Computers and Technology
1 answer:
Aloiza [94]2 years ago
8 0

Using the knowledge in computational language in JAVA it is possible to write a code that  print the respective minimum and maximum values as a single line

<h3>Writting the code in JAVA:</h3>

<em>import java.io.*;</em>

<em>import java.util.*;</em>

<em>import java.text.*;</em>

<em>import java.math.*;</em>

<em>import java.util.regex.*;</em>

<em />

<em>public class Solution {</em>

<em>    public static void main(String[] args) {</em>

<em>        Scanner in = new Scanner(System.in);</em>

<em>        long sum = 0;</em>

<em>        long max = Long.MIN_VALUE;</em>

<em>        long min = Long.MAX_VALUE;</em>

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

<em>            long n = in.nextLong();</em>

<em>            sum += n;</em>

<em>            max = Math.max(max, n);</em>

<em>            min = Math.min(min, n);</em>

<em>        }</em>

<em>        System.out.println((sum - max) + " " + (sum - min));</em>

<em>    }</em>

<em>}</em>

See more about JAVA at brainly.com/question/12974523

#SPJ1

You might be interested in
Which attack intercepts communications between a web browser and the underlying computer?
Vlad [161]

The question has the below multiple choices

A. Man-In-The-Middle (MITM)
B. Man-In-The-Browser (MITB)
C. Replay
D. ARP poisoning

The answer is B

As compared to the Man-In-The-Middle attack, the Man-In-The-Browser attack intercepts communications between parties to manipulate or steal data. This attack seeks to intercept and steal or manipulate communication that exists between the browser and the underlying computer. It begins with a Trojan infecting the underlying computer and installing an extension into the web browser configuration.







6 0
3 years ago
Design and implement an algorithm that gets a list of k integar values N1, N2,...Nk as well as a special value SUM. Your algorit
Fittoniya [83]

Answer:

The algorithm is as follows:

1. Start

2. Input List

3. Input Sum

4. For i = 0 to length of list - 1

4.1 num1 = List[i]

5. For j = i to length of list - 1

5.1 num2 = List[j]

6. If SUM = num1 + num2

6.1 Print(num1, num2)

6.2 Break

The algorithm is implemented in python as follows:

def checklist(mylist,SUM):

     for i in range(0, len(mylist)):

           num1 = mylist[i]

                 for j in range(i+1, len(mylist)):

                       num2 = mylist[j]

                       if num1 + num2== SUM:

                             print(num1,num2)

                                   break;

Explanation:

I'll explain the Python code

def checklist(mylist,SUM):

This line iterates from 0 to the length of the the last element of the list

     for i in range(0, len(mylist)):

This line initializes num1 to current element of the list

           num1 = mylist[i]

This line iterates from current element of the list to the last element of the list

                 for j in range(i+1, len(mylist)):

This line initializes num1 to next element of the list

                       num2 = mylist[j]

This line checks for pairs equivalent to SUM

                       if num1 + num2== SUM:

The pair is printed here

                             print(num1,num2)

                                   break;

6 0
3 years ago
A student is browsing a website. While browsing, he click on a link that takes him to another website. Which code gives the corr
ddd [48]

Answer:

:0 i dont know

Explanation:

7 0
3 years ago
Jerry has received an email on his company’s email system. The email is in regard to a new update the company plans to implement
Alla [95]

Answer:

The type of attack is <em>Phising Email.</em>

<em />

Explanation:

Phishing emails are mails purportedly sent by a company staff seeking some vital information from an employee or employees. Criminals often use such method to get sensitive information about a company and its details from its own employees who may not be able to differentiate such mails from the normal company mails. Thus the mail that Jerry receives regarding a new update the administrators of his company intends to implement can be regarded as a Phishing email.

5 0
3 years ago
I am buying a BluRay drive access time is 180ms and the other is 210ms(BD-ROM) whats does access time mean
kkurt [141]
It means how fast it can read the disk so if you want faster data transfer you would go for blurry if you really don't care go for the other one
6 0
3 years ago
Other questions:
  • Which software product release category is "generally feature complete and supposedly bug free, and ready for use by the communi
    7·1 answer
  • . The toasting cycle of an automatic toaster is started by A. pushing the bread rack down. B. pushing the start button. C. turni
    14·2 answers
  • Assume that passwords are selected from four-character combinations of 26 alphabeticcharacters. Assume that an adversary is able
    11·1 answer
  • Question 2 (2 points)
    6·1 answer
  • What is the missing line of code?
    7·2 answers
  • How many times will line 7 be executed when the following code is run?
    5·1 answer
  • Examples of system software include operating systems like macos, Linux, Android and
    10·2 answers
  • What is the output?
    11·1 answer
  • Explica el empleo de cuentas y contraseñas en archivos
    6·1 answer
  • Stephen is looking through some design diagrams created for a specific application. He spots a diagram which uses a parallelogra
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!