1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
|
#include <iostream>
using namespace std;
const int MAX = 40;
#include "HugeInteger.h"
int main()
{
int op1[MAX] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,2,2,0};
int op2[MAX] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,1,0};
char op;
op = '*';
// HugeInteger num1;
// HugeInteger num2;
// cin >> num1;
// cin >> num2;
// cout << "num1 = " << num1 << endl;
// cout << "num2 = " << num2 << endl;
HugeInteger object(op1);
HugeInteger arr(op2);
// object.create_array(num1, num2, op1, op2);
cout << "object: " << object << endl;
cout << "arr: " << arr << endl;
if (op == '+')
arr = arr + object;
else
arr = arr * object;
cout << "The answer is: " << arr << endl;
return 0;
// object.display();
}
|