-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbignumber.h
29 lines (22 loc) · 820 Bytes
/
bignumber.h
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
#ifndef BIGNUMBER_H
#define BIGNUMBER_H
typedef signed char int8;
typedef struct {int8* data; int nelements; int sign;} bignum;
typedef bignum* BigNumber;
BigNumber bignumber(void);
void bignumber_insert(BigNumber A, int8 a);
void bignumber_free(BigNumber A);
void read_input(BigNumber A);
void read_input_file(BigNumber A, FILE* file);
void reverse(BigNumber A);
void filter_left_zero(BigNumber A);
int max(int a, int b);
int compare(BigNumber A, BigNumber B);
void add(BigNumber A, BigNumber B, BigNumber RES);
void subtract(BigNumber A, BigNumber B, BigNumber RES);
void multiply(BigNumber A, BigNumber B, BigNumber RES);
void bignumber_print(BigNumber A);
void bignumber_print_file(BigNumber A, FILE* out);
int choose_operation(char op, int signal_a, int signal_b);
char* file_name(const char* input);
#endif