* Small fix.
[biginteger-lo27.git] / test.c
blob5047c925b6821a4efeea65167083883e2a9d1125
1 #include <stdio.h>
2 #include <stdlib.h>
4 #include "biginteger.h"
6 int main(int argc, char* argv[])
8 if (argc < 2) {
9 puts("Bad arguments");
10 return EXIT_FAILURE;
13 BigInteger b = newBigInteger(argv[1]);
14 BigInteger b2 = newBigInteger(argv[2]);
16 printBigInteger(b);
18 printf("Comparing to itself : %d\n", compareBigInt(b, b));
20 printf("Comparing to second : %d\n", compareBigInt(b, b2));
22 printf("Adding the two together : ");
24 printBigInteger(sumBigInt(b, b2));
25 printf("Diff the two :");
26 printBigInteger(diffBigInt(b, b2));
28 printf("Multiplication : ");
29 printBigInteger(mulBigInt(b, b2));
31 return EXIT_SUCCESS;