#include <iostream>
using namespace std;
int power(int baseNum, int powNum){
int result = 1;
for(int i = 0; i < powNum; i++){
result = result * baseNum;
}
return result;
}
int main()
{
cout << power(10, 94);
return 0;
}
Why does this turn out 0 in code::blocks? Is it that the system memory is too small? I have 8 GB of RAM on my laptop.