#include "intmodp.h"
IntModp::prime = 13; // Set the global prime to 13
int
main(int argc, char** argv)
{
IntModp a = 5; // Creates a IntModp type with value 5
IntModp b = 8; // Creates a IntModp type with value 8
IntModp c = a+b ; // Add a + b % 13 and store in c.
cout << c; // Prints result to standard output.
if (is_zero(c)) // Test for zero
cout << "Result is 0\n";
}
1.0