Algorithms_in_C 1.0.0
Set of algorithms implemented in C.
|
Problem 20 solution More...
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
Data Structures | |
struct | _big_int |
store arbitratily large integer values as a linked list of digits. More... | |
Typedefs | |
typedef struct _big_int | big_int |
store arbitratily large integer values as a linked list of digits. | |
Functions | |
big_int * | add_digit (big_int *digit, char value) |
Function that allocates memory to add another digit at the MSB. | |
char | remove_digits (big_int *digit, int N) |
Function to remove digits preceeding the current digit. | |
int | main (int argc, char **argv) |
Main function. | |
Problem 20 solution
Implementation uses a custom big_int
structure that can store arbitrarily large integer numbers.
Function that allocates memory to add another digit at the MSB.
int main | ( | int | argc, |
char ** | argv | ||
) |
Main function.
char remove_digits | ( | big_int * | digit, |
int | N | ||
) |
Function to remove digits preceeding the current digit.