adds two rational numbers represented as numerator and denominator
What will be an ideal response?
```
{
int greatest;
ansDenom = denom1 * denom2;
ansNum = num1 * denom2 + num2 * denom1;
greatest = gcd( abs( ansNum ), ansDenom );
ansNum /= greatest;
ansDenom /= greatest;
}
```
Computer Science & Information Technology
You might also like to view...
Every C++ function consists of two parts, a function header and a function ____.
a. prototype b. definition c. body d. declaration
Computer Science & Information Technology
Which version of Gigabit Ethernet uses a unique cable known as twinaxial?
A. 1000BaseT B. 1000BaseCX C. 1000BaseSX D. 1000BaseLX
Computer Science & Information Technology