GReaper gives the best advice on this, but not the most fun advice I think
The following is an example of how you can make your own fraction calculations to hundreds of places if you like. If you want to go into the millions or billions, you probably have to ouput it to a file. I think the console window can only hold so much.
Code:
#include <stdio.h>
#include <string.h>
#include <math.h>
#define SIZE 500
char* calcFraction(int numer, int denom);
int main() {
printf("%s\n", calcFraction(78, 7));
}
char* calcFraction(int numer, int denom) {
static char fraction[SIZE];
memset(fraction, 0, SIZE);
sprintf(fraction, "%d", numer / denom);
strcat(fraction, ".");
for (int i = strlen(fraction); i < SIZE; ++i) {
numer = numer % denom * 10;
sprintf(&fraction[i], "%d", numer / denom);
}
fraction[SIZE - 1] = '\0';
return fraction;
}