Random-Cpp/NegBin/main.cpp

21 lines
391 B
C++
Raw Permalink Normal View History

2020-11-06 22:34:02 +01:00
#include <iostream>
#include "NegBin.h"
int main()
{
NegBin a = 0b11011_nb;
NegBin b = 0b10010_nb;
std::cout << a << "-" << b << " = " << a-b << std::endl;
std::cout << a << "*" << 5 << " = " << a*5 << std::endl;
auto c = NegBin(6);
auto d = NegBin(-12);
std::cout << "6 is " << c << std::endl;
std::cout << "-12 is " << d << std::endl;
return 0;
}