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
PowerPoint is a visual aid for many speakers. Discuss some points to remember when adding text to a PowerPoint presentation. How
Murljashka [212]
1. Less picture less distraction, but where to put pictures ? At the start of your presentation just to initially get the attention of the audience.
2. Use bullets for texts, never use paragraphs. Use short text or even words only which captures the subject of the presentation.
3. In conjunction with point 1. Use less animations as well. Especially for formal presentations

Additionally : Make sure to know your audience, for professionals, make the presentations short and precise. For much informal audiences you can be playful but always keep in mind not to overshadow the attention from the speaker.
7 0
2 years ago
Which of the following is NOT a method in which a macro can be run?
liubo4ka [24]
C....................
7 0
2 years ago
A reputable, world-renowned auction house uses blockchain to verify the authenticity of paintings prior to placing them up for s
REY [17]

Answer:

The ledgers are secure, shared, and incorruptible is the correct answer.

6 0
2 years ago
____ twisted pair is the least quality twisted pair wire that should be used in a data/voice application.
xxMikexx [17]

Answer:

Category 5 (Cat 5) twisted pair is the least quality twisted pair wire that should be used.

Explanation:

The reason is as follows:

  1. Category 1 twisted pair is not suitable for transmitting data but comes in handy for telephone communications. Hence, it should not be used in a data/voice application.
  2. Category 2 twisted pair is suitable for data transmission, however, it can only transmit at 4Mbps which is very slow. Hence, it should not be used in a data/voice application.
  3. Category 3 twisted pair can transmit data with speed reaching 10Mbps which is slow for voice/data communication.
  4. Category 4 twisted pair can transmit data with speed reaching 16Mbps and is used in token ring networks. It is slow for communicating in a voice/data application.
  5. Category 5 twisted pair is the least qualified to be used in a voice/data application because it can transmit data at speeds that reach 100Mbps.

Hence, Cat 5 or Category 5 twisted pair is the least quality twisted pair that should be used in a data/voice application.

6 0
2 years ago
Jim has excellent oral and written communication skills. He enjoys public speaking and wants a job in which he will interact wit
lianna [129]
The best job for Jim would be public relations specialist.
7 0
2 years ago
Read 2 more answers
Other questions:
  • Which sector provides scope for multimedia designers?
    10·1 answer
  • Which is true of case-based reasoning (CBR)?
    6·1 answer
  • Given a pattern as the first argument and a string of blobs split by | show the number of times the pattern is present in each b
    14·1 answer
  • An extranet is like an intranet except that it allows company employees access to corporate Web sites from the ______
    13·1 answer
  • Ciscon Telecom is a mobile operator in the European Union. The company provides personalized services to its customers, and its
    8·2 answers
  • Write a program that simulates the functionality of a vending machine having the following characteristics:• The vending machine
    11·1 answer
  • Hashing algorithms are used on evidence files to uphold the chain of custody in an investigation. Which of the following is NOT
    5·1 answer
  • How to code 2.9.5: Four colored triangles {Code HS}
    10·1 answer
  • JAVA...Write a statement that calls the recursive method backwardsAlphabet() with parameter startingLetter.
    9·1 answer
  • In this first journal assignment, you will explore the role of testing in the SDLC. You will explain the role and importance of
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!