Skip to content

Latest commit

 

History

History
18 lines (17 loc) · 627 Bytes

README.md

File metadata and controls

18 lines (17 loc) · 627 Bytes

C++ Fraction Class

A C++ class to handle fraction including the following features

  • Store negative and positive fractions, in fractional form (decimal approximations will not be made);
  • Store the fraction in normalized or reduced form;
  • Overload the following unary operators to apply to fractions
    • (negation)
  • ++ (post-increment)
  • ++ (pre-increment)
  • Overload the following binary operators to apply to fractions
    • (addition)
    • (subtraction)
    • (multiplication)
  • / (division)
  • += (addition and assignment)
  • <, <=, ==, !=, >=, > (comparison)
  • << (used with cout)
  • (used with cin)