diff --git a/current b/current index 763522a..be822ce 100755 Binary files a/current and b/current differ diff --git a/src/main.c b/src/main.c index 400a44a..01d8475 100644 --- a/src/main.c +++ b/src/main.c @@ -1,5 +1,6 @@ #include #include "utils.h" +#include /* Consider all integer combinations of ab for 2 ≤ a ≤ 5 and 2 ≤ b ≤ 5: @@ -18,6 +19,14 @@ */ int main(int argc,char**argv) { - printf("%s",BigPow(3,7).str); + struct String*numbs=malloc(sizeof(struct String)*0); + int arrSize=0; + for (int a=2;a<=5;a++) { + for (int b=2;b<=20;b++) { + numbs=realloc(numbs,sizeof(struct String)*++arrSize); + numbs[arrSize-1]=BigPow(a,b); + printf("\n%s\n",numbs[arrSize-1].str); + } + } return 0; } \ No newline at end of file diff --git a/src/utils.c b/src/utils.c index a395806..0db2900 100644 --- a/src/utils.c +++ b/src/utils.c @@ -43,17 +43,17 @@ struct String mult(struct String numb1, struct String numb2) { val[j]=addends[i][j]+'0'; } sum=add((struct String){n1.length+1+i,val},sum); - //printf("%s\n",sum.str); + printf("\nAA:%s",sum.str); } if (sum.str[0]=='0') { - char*newStr=malloc(sum.length-1); - for (int i=1;i