//idea: given two fractions. Add them and display result //Dennis #include using namespace std; int gcd(int a,int b) { if (a>a>>t>>b>>o>>c>>t>>d && (a|b|c|d)!=0) { int top=a*d+b*c; int bottom=b*d; int whole=0; g=gcd(top,bottom); top/=g; bottom/=g; if (top>=bottom) { whole=top/bottom; top%=bottom; } if (whole>0) { cout<1) cout<<" and "; } if (bottom>1) cout<