Advertisement
Guest User

Untitled

a guest
Sep 26th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. #include<iostream>
  2. #include "Fraction.h"
  3. using namespace std;
  4.  
  5. int main ()
  6. {
  7. Fraction f1(1,2);
  8. Fraction f2(1, 2);
  9. Fraction f3 (3, 5);
  10. if (f1.equal(f2))
  11. cout << "\nFraction f1 equals f2 : ";
  12. else
  13. cout << "\nFraction f1 NOT equal f2 : ";
  14. cout << "\n\n";
  15. if (f1.equal(f3))
  16. cout << "\nFraction f1 equals f3: ";
  17. else
  18. cout << "\nFraction f1 NOT equal f3: ";
  19. cout << "\n\n";
  20. return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement