/**
6. Repeat the previous exercise, but with a class Number<T>
where T can be any numeric type. Try adding % to Number and
see what happens when you try to use % for Number<double>
and Number<int>.
***************************/

#include <iostream>
#include "Numbers.h"

using namespace std;

int main()
{
    Number<int> x{111};
    Number<int> y{7};
    Number<double> m = 7;
    Number<double> n = 111;

    cout << "\nx = ";
    x.show();
    cout << "\ny = " << y;

    cout << "\ny/x = " << y / x;
    cout << "\nn/m = " << n / m;
    /*for(int u = 50; u<60; u++)
        for(int v = 5; v<15; v++)
            cout << "\n" << u << "%" << v << " = " << u%v;*/
    //cout << "\nx is a variable of type " << typeid(x).name() << endl;
    //cout << "\ny is a variable of type " << typeid(y).name() << endl;
    ///if(typeid(x).name()=="6NumberIiE") cout << "ha!";
    Number<double> z;
    cout << "\n" << x << "%" << y << " = " << x%y;
    cout << "\n" << n << "%" << m << " = " << n%m;
    for(double p = 6.5; p < 10.6; p += 0.2)
        for(double q = 2; q < 4; q += 0.3) {
            Number<double> d1{p}, d2{q};
                cout << "\nNumber<double>{" << p
         << "}%Number<double>{" << q << "}" << " = "
         << d1%d2;
    }

    cout << "\nEnter an Number<T>: ";
    cin >> z;
    cout << "\nz = " << z;
    cout << "\nz/3 = " << z / 3;


    return 0;
}
