Adding, Subtracting Fractions in Java
878629Aug 5 2011 — edited Aug 7 2011I am trying to make an application that inputs 2 fractions and adds,subs,multi, divides them.
I have most of my methods complete, its just I can't figure out how to successfully use the euclidean algorithm for my adding method
this is my gcd class
public static int gcd(int a, int b){
if(b == 0)
return a;
return gcd(b, a % b);
i am trying to call it in my adding method, but it outputs (b, a % b) two numbers
can someone help me out with this?