Skip to content

Chanme1/CSCI-272-Rational

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 

Repository files navigation

CSCI-272-Rational

The purpose of this project is to create a class called Rational for performing arithmetic with fractions. The program has integer variables to represent the private data of the class and a constructor that initializes an object when it's declared. In addition, it has public member functions that performs each of the following tasks.

  • Add two Rational numbers.
  • Subtract two Rational numbers.
  • Multiple two Rational numbers.
  • Divide two Rational numbers.
  • Print the Rational numbers in the form a/b, where a is the numerator and b is the denominator.
  • Print the Rational numbers in floating-point form

Note: All results were stored in reduced form and Operator Overloading was used in the program.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages