this is incredibly sad that im having this much trouble with this. but im gettin the idea here.... i was tryin to go about the problem using jus loops... so far everyone has told me to use gcd (which im not really familiar with.. er rather havent learned yet) but this is the code.. that i think Nick sent::
int gcd(int a, int b)
{
int r;
while (b != 0)
{
r = a % b;
a = b;
b = r;
}
return a;
}
i understand this code fer the most part.. but im confused on what variables you are asking the user to input and where you put your "cout <<" to return there answer... like i said, im literarlly just starting to learn c++ and its hard to incorporate a small line of code. all i really want to do is understand this, so if anyone could try to explain how that code ties in with the rest of the problem id be grateful. thanks everyone.
*any new viewers :: problem = tryin to simplipy a fraction entered by the user *