trop de trucs
All checks were successful
Linux arm64 / Build (push) Successful in 2m33s

This commit is contained in:
2024-05-14 13:00:59 +02:00
parent d9e49d1319
commit a135df2e96
14 changed files with 98 additions and 214 deletions

View File

@@ -3,17 +3,20 @@
#include <iostream>
class NR {
public:
using Int = long long;
private:
int m_Numerator;
int m_Denominator; // has to be > 0, sign is carried by the numerator
Int m_Numerator;
Int m_Denominator; // has to be > 0, sign is carried by the numerator
public:
NR();
NR(int entier);
NR(int numerator, int denominator); // check if denominator != 0
NR(Int entier);
NR(Int numerator, Int denominator); // check if denominator != 0
int GetNumerator() const;
int GetDenominator() const;
Int GetNumerator() const;
Int GetDenominator() const;
bool operator==(const NR& opNR) const;
bool operator<(const NR& opNR) const;
@@ -43,5 +46,3 @@ class NR {
private:
void Reduce();
};
int PGCD(int x, int y);