subtracts two rational numbers represented as numerator and denominator

What will be an ideal response?


```
void subtractRational( 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...

A ____is the computer an individual uses to access information via the Internet.

A. Web client B. Web server C. Web browser D. hyperlink

Computer Science & Information Technology

Reports and subreports are commonly used to show related records from tables in a(n) ________ relationship

Fill in the blank(s) with correct word

Computer Science & Information Technology

Which of the following is the MOST effective method of retrieving a screw which has fallen into a computer case?

A. Use a computer vacuum to retrieve the screw. B. Use an extension magnet to access the screw. C. Tap the case bezel repeatedly to loosen the screw. D. Abandon screw retrieval and use a spare screw.

Computer Science & Information Technology

Explain why a three way match may not be required for transactions covered by a trading partner agreement.

What will be an ideal response?

Computer Science & Information Technology