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
NemiM [27]
3 years ago
12

Develop a Java program that deals with greatest common dominators GCDs of positive integers. GCD of two positive integers is the

is the largest positive integer that divides each of those two integers. The program works with the following specifications: a. Write a java method getGCD takes as parameter two integers and returns their greatest common divisor. The GCD could be computed for any two positive numbers. If the one of the two integers (or both) is negative the method should return -1. a. In the main method, • the program reads from the user the number of pairs of integers to get GCD of each pair. • According to the number of pairs, the program prompts the user to enter pairs of integers and saves these numbers in 2 single-dimensional arrays; the first array firstNumbersArray is for the first numbers in the entered pairs, and the second array secondNumbersArray is for the second numbers in the entered pairs. • The program should get the GCD of each pair by calling the method getGCD repeatedly and save the produced GCDs in a third single-dimensional array called GCDsArray. • The program should count the number of positive pairs that it could compute their GCD. • Finally, the program should print all the entered pairs with their GCD and the ratio of the pairs with positive GCDs compared to all entered pairs.
Computers and Technology
1 answer:
DENIUS [597]3 years ago
6 0

Answer:

i dont even know

Explanation:

You might be interested in
PLEASE WRITE A ONE SENTANCE SUMMARY, WILL GIVE BRAINLIEST!! (history of computers) You have completed an extensive investigation
vladimir1956 [14]

Answer:

Charles Babbage, (born December 26, 1791, London, England—died October 18, 1871, London), English mathematician and inventor who is credited with having conceived the first automatic digital computer.

Explanation:

The idea of mechanically calculating mathematical tables first came to Babbage in 1812 or 1813. Later he made a small calculator that could perform certain mathematical computations to eight decimals. Then in 1823 he obtained government support for the design of a projected machine, the Difference Engine, with a 20-decimal capacity. The Difference Engine was a digital device: it operated on discrete digits rather than smooth quantities, and the digits were decimal (0–9), represented by positions on toothed wheels rather than binary digits (“bits”). When one of the toothed wheels turned from nine to zero, it caused the next wheel to advance one position, carrying the digit. Like modern computers, the Difference Engine had storage—that is, a place where data could be held temporarily for later processing.

6 0
3 years ago
Which of the following is a trend that began during the Vietnam War and continued with the Internet?
Blizzard [7]
<span>As far as I remember, this one - a. a move toward stricter control of mass-media communications by Congress and the FCC </span><span>is a trend that began during the Vietnam War and continued with the Internet.</span>
7 0
3 years ago
Most P2P apps or services provide safety and privacy features such as verification of payment amount before payment is sent, a u
Vesna [10]

Most peer-to-peer (P2P) apps or services provide safety and privacy features such as <u>onetime password (OTP)</u>.

<h3>What is P2P service?</h3>

P2P service is an abbreviation for peer-to-peer (P2P) service and it can be defined as a decentralized platform through which two (2) individuals or business firms interact with each other directly, without any third-party or an intermediary  being involved.

Generally, most peer-to-peer (P2P) applications or services provide safety and privacy features to customers such as:

  • Verification of payment amount before payment is sent.
  • A user PIN
  • The use of a onetime password (OTP).

Read more on P2P here: brainly.com/question/26190446

8 0
2 years ago
Explain why database management systems are used in hospitals? Discuss
Sergeeva-Olga [200]

The reason why database management systems are used in hospitals is because the use of Healthcare databases aids in terms of diagnosis and treatment, handle documentation and billing, and others.

<h3>What is a database management system in healthcare?</h3>

A database management system (DBMS) is known to be a type of software that has been developed to help people to form and keep databases.

It is one that helps to lower the risk of errors associated with medical operations and management. It reduces  paperwork and staff and also improves  performance.

Learn more about database management from

brainly.com/question/24027204

8 0
2 years ago
Write two example use of relationships ICT
Yakvenalex [24]

Answer:

Read it all before you write if this isn't what you searching for I'm sorry...:(

A relationship, in the context of databases, is a situation that exists between two relational database tables when one table has a foreign key that references the primary key of the other table. Relationships allow relational databases to split and store data in different tables, while linking disparate data items.

For example, in a bank database a CUSTOMER_MASTER table stores customer data with a primary key column named CUSTOMER_ID; it also stores customer data in an ACCOUNTS_MASTER table, which holds information about various bank accounts and associated customers. To link these two tables and determine customer and bank account information, a corresponding CUSTOMER_ID column must be inserted in the ACCOUNTS_MASTER table, referencing existing customer IDs from the CUSTOMER_MASTER table. In this case, the ACCOUNTS_MASTER table’s CUSTOMER_ID column is a foreign key that references a column with the same name in the CUSTOMER_MASTER table. This is an example of a relationship between the two tables.

3 0
3 years ago
Other questions:
  • What is difference between actual parameters and formal parameters in java?​
    8·2 answers
  • What do you call the combination of title, description, tags, and thumbnail?
    6·1 answer
  • Assume that someone dictates you a sequence of numbers and you need to write it down. For brevity, he dictates it as follows: fi
    14·1 answer
  • Checking authentication, checking authorization and access control, auditing systems, and verifying firewalls and other filters
    12·1 answer
  • Which term describes the second core IPSec security protocol; it can perform authentication to provide integrity protection, alt
    13·1 answer
  • Seven Features of computer aids design software
    6·1 answer
  • Weak Induction
    8·1 answer
  • What is technology??
    12·1 answer
  • Plz help me to solve all of this question answer.(of question no 7,8,9)​
    12·1 answer
  • TASK 1. JUMBLE ME! Direction: Arrange the jumbled letters to form a word. 1. PEREAM 2. RRENT CU 3. METREMO H 4. TORSISER 5. TANC
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!