Answer to Question #13537 in C++ for harini
Create a class RationalNumber for representing such numbers. There are 2 private data members named numerator and denominator of type int.
1
2012-08-30T09:47:57-0400
class RationalNumber{
public:
int numerator, denominator;
void represent(){
& cout<<numerator<<"/"<<denominator<<"\n";
}
};
Need a fast expert's response?
Submit order
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Learn more about our help with Assignments:
C++
Comments
Leave a comment