answer.
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
dsp73
2 years ago
13

Write a program to determine all pairs of positive integers, (a, b), such that a < b < 1000 and [a2 + b2 + 1)/(ab) is an i

nteger.
Computers and Technology
1 answer:
alina1380 [7]2 years ago
5 0

Answer:

1. We must import the packages for the array list

2. We create the array to store the data

3. We make the first for cycle for 1000 values

4. The second for cycle for the variable a

5. We make the operation

6. Cast the result to an Integer and check if they are equivalent

7. We print the result

Explanation:

package javaapplication16;

import java.util.ArrayList;

public static void main(String[] args) {

ArrayList result = new ArrayList();

       for(int b = 0; b < 1000; b++) {

           for(int a = 0; a < b; a++) {

               double calculatedResult = (Math.pow(a, 2) + Math.pow(b, 2) + 1) / (a * b);

               if (calculatedResult == (int)calculatedResult) {

                   result.add("[" + a + "," + b + "]");

               }

           }

       }

       System.out.println("Result: " + result);

}

You might be interested in
An administrator has been working within an organization for over 10 years. He has moved between different IT divisions within t
rodikova [14]

Answer:

User roles and access authorization

(Explanation of this question is given below in the explanation section.

Explanation:

As noted in question that a terminated employee comeback in office and installed some malicious script on a computer that was scheduled to run a logic bomb on the first day of the following month. And, that script will change administrator passwords, delete files, and shut down over 100 servers in the data center.

The following problem can be with that account

  • Unauthorized user access and privileges

The user may be given unauthorized access to system resources. If a user has unauthorized access to system resource then he can modify or destroy the system function easily.

  • The firewall may be disabled to detect the malicious script

The firewall should be enabled to detect such types of attack from unauthorized access to the system

  • Role

May be user role is not defined properly. If role would be defined according to user role then there are very fewer chances in doing unauthorized changes in the system that will result in an unexpected outage.

5 0
2 years ago
Pick the correct statements regarding cell references.
shusha [124]

Statement two and three is correct.

Statement 1 is incorrect. A relative reference changes when a formula is copied to another cell while Absolute references remain constant. However, it is safe to say that an absolute address can be preceded by a $ sign before both the row and the column values. It is designated by the addition of a dollar sign either before the column reference, the row reference, or both. Statement C is also correct. A mixed reference is a combination of relative and absolute reference and the formula (= A1 + $B$2) is an example of a mixed cell reference.

7 0
2 years ago
Read 2 more answers
Write a statement to add the key Tesla with value USA to car_makers. Modify the car maker of Fiat to Italy. Sample output for th
marishachu [46]

Answer:

Input code:

car_makers = {'Honda': 'Japan', 'Fiat': 'Germany'}

#add Tesla and USA as corresponding value

car_makers['Tesla'] = 'USA'

#change Fiat entry to Italy instead of Germany

car_makers['Fiat'] = 'Italy'

print(car_makers)

print('Honda made in', car_makers['Honda'])

print('Fiat made in', car_makers['Fiat'])

print('Tesla made in', car_makers['Tesla'])

Explanation:

The first line is a define object in the python code, containing two entries of Honda and Fiat and their respective countries.

The python code adds an entry to the object "car maker" using the bracket notation, the tesla car from USA.

The country of the Fiat car is changed from Germany to Italy, using the bracket notation.

The output of the complete object and the individual cars is given.

<u>output of the python code:</u>

{'Honda': 'Japan', 'Fiat': 'Italy', 'Tesla': 'USA'}

Honda made in Japan

Fiat made in Italy

Tesla made in USA.

7 0
2 years ago
When handling project scope creep, which are two things that all parties involved need to be aware of?
WARRIOR [948]

Additional resource needed for the projects

Additional time needed for the project

<u>Explanation:</u>

In any project handing their will expected diversion and add on requirement, so to complete a project additional time and additional resource is required to finish a project.

As advice due the project details, end user has keep enough buffer for deviations on resource of man power and additional times taken to finish the project.

While design the project each scope of work is measure with additional time to complete the task

Each scope of work is considered as task in project management.

3 0
2 years ago
The microprogram counter (MPC) contains the address of the next microcode statement for the Mic1 emulator to execute. The MPC va
Ray Of Light [21]

Answer:

MAR bit

Explanation:

The MPC computers area set of software and hardware standards that was developed by the consortium of computer firms which is led by Microsoft. It contains the address of a next microcode for the Mic1 emulator foe execution.

The part of the executing microcode instruction that determines the value which is placed in the MOC is the MAR bit. The MAR is the memory address register in the CPU which stores the memory address or such addresses to which some data will be sent and also stored.

6 0
1 year ago
Other questions:
  • Why is it important to back up data on a computer before you burn-in test the cpu?
    9·1 answer
  • Discuss how the user-designer communications gap can cause a good project to go bad.
    8·1 answer
  • Carrie works on a help desk and is assigned a ticket that was automatically generated by a server because of an error. The error
    5·1 answer
  • Write a program that first gets a list of integers from input. The input begins with an integer indicating the number of integer
    12·2 answers
  • Suppose the information content of a packet is the bit pattern 1110 0110 1001 1101 and an even parity scheme is being used. What
    15·1 answer
  • In the description of the Hack machine language in chapter 4, it is stated that in well-written programs a C-instruction that ma
    12·1 answer
  • A machine is having issues, so the user is responsible for getting the machine serviced. Which stage of the hardware lifecycle d
    13·1 answer
  • Two middle-order batsmen are compared based on their performance in their previous cricket match.
    7·1 answer
  • Which is the correct notation to specify the following inheritance?
    8·1 answer
  • Which 2 problems does the Pay down credit card workflow solve for clients? (Select all that apply) It helps clients stay on top
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!