Question: Write a C++ program that has this FRACTION structure struct FRACTION{ int num; int den; }; That will keep track of numerator and denominator of
Write a C++ program that has this FRACTION structure
struct
FRACTION{
int num;
int den;
};
That will keep track of numerator and denominator of a fraction.
using pointers
that is :
getFraction() function will now return a pointer too a struct. multiply()function will now accept two struct via a pointer and return the result via a pointer. add()function will now accept two struct via a pointer and return the result via a pointer.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
