Image

Imagepyro01 wrote in Imagecpp

Would this program output a googolplex?


#include <iostream>

using namespace std;

int print(int thr,int until);

int main() {
  int threes=0;
  int power=0;
  int powertwo=0;
  cout << "I now present to you.. a googolplex!\n\n1,";
  while(powertwo<10) {
    power=0;
    while(power<100000) {
      print(threes, 100000);
      power++;
    }
  }  
  return 1;
}

int print(int thr,int until) {
  int repetitions=0;
  while (repetitions<until) {
    cout << "0";
    thr++;
    if(thr>=3) {
      cout << ",";
      thr=0;
    }
    repetitions++;
  }
  return thr;
}