#ifndef __FRACTION_H__
#define __FRACTION_H__

struct fraction final {
        int numerator;
        int denominator;

        fraction operator+(const fraction &frac);
        fraction operator*(const fraction &frac);
        fraction &operator*=(const fraction &frac);
        fraction &operator=(const fraction &frac);
        bool operator==(const fraction &frac);
        bool operator!=(const fraction &frac);
        fraction &simplify();
        float real() const;
private:
        int gcd(int a, int b);
};

#endif
