Alright, soo the task at hand is to compute 10^10 where the first 10 is an integer called "base" and the second 10 is an unsigned integer called "exponent".
int base = 10; unsigned int exponent = 10; int i = 1; long long result = 1;
while(i<=exponent){
result = result*base;
i++;
}
printf("X^y = %ld\n\n", result);
Now I've tried this with a for loop, while loop, recursive functions etc. And my "result" value is still 1410065400 for some reason? It should be just a one with a bunch of zeros. If anyone got a simple solution to this problem I would be very happy to hear it. And if this has been posted before (didn't find anything on here about it tho) then I would gladly accept the link to that solution.