/*************************************************************************** rational.cpp - description ------------------- begin : Fri Jan 17 19:41:58 CST 2003 copyright : (C) 2003 by Daniel Eric Smith email : ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include #include "rational.hpp" using namespace std; int main() { rational r,s,t,u,x,y,a,b; float f,g; cout << "Enter the numerator and the demoninator of r:"<>r; cout << "Enter the numerator and the demoninator of s:"<>s; //r.reduce(); x=r+s; y=r-s; t=r*s; u=r/s; a=pow(r,2); b=pow(s,2); f=r.decimal(); g=s.decimal(); cout <<"r="<