ubtracts two rational numbers represented as numerator and denominator

What will be an ideal response?


```
( int& ansNum, int& ansDenom,
int num1, int denom1,
int num2, int denom2 )
{
int greatest;

ansDenom = denom1 * denom2;
ansNum = num1 * denom2 - num2 * denom1;
greatest = gcd( ansNum, ansDenom );
ansNum /= greatest;
ansDenom /= greatest;
}

```

Computer Science & Information Technology

You might also like to view...

Write a program to simulate Kleinberg’s 2-D grid model (with sufficiently large size, e.g., 10,000 nodes) where you need to add five LLs based on Euclidean distance between the nodes. The experiment should be performed for the following cases: (i) ? = 1, (ii) ? = 2, and (iii) ? = 3, where ? is the clustering coefficient. Comment on the observations.

What will be an ideal response?

Computer Science & Information Technology

To protect a computer from damage due to power fluctuations, a _________ can be used whenever the computer is plugged into a power outlet. A. surge suppressor B. power controller C. surge switcher D. power regulator

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

Low coupling limits a module's flexibility.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

?The _____ property should be used only when no markup tags are involved.

A. ?innerHTML B. ?outerHTML C. ?textContent D. ?insertAdjacentHTML

Computer Science & Information Technology