-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBigInt.h
More file actions
30 lines (24 loc) · 856 Bytes
/
BigInt.h
File metadata and controls
30 lines (24 loc) · 856 Bytes
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
#ifndef BIGINT_H_
#define BIGINT_H_
#include <iostream>
#include <string>
#include<vector>
#define max(a,b) ((a) > (b) ? (a) : (b))
std::vector<unsigned int> add(std::vector<unsigned int> lhs, std::vector<unsigned int> rhs);
std::vector<unsigned int> subtract(std::vector<unsigned int> lhs, std::vector<unsigned int> rhs);
std::vector<unsigned int> multiply(std::vector<unsigned int> num1, std::vector<unsigned int> num2);
class bigInteger
{
public :
std::string representation;
std::vector <unsigned int> v;
short int signOfInteger;
void toInteger();
void toString();
void displayNumber();
};
bigInteger multiplyBigInteger( bigInteger a, bigInteger b);
bigInteger addBigInteger( bigInteger a, bigInteger b);
bigInteger subtractBigInteger( bigInteger a, bigInteger b);
bigInteger modulo(bigInteger a, bigInteger b);
#endif