Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
The Monkey Theory
#11
(02-17-2010, 05:08 PM)zzbomb Wrote: Grr. Gimme 5 min. ill program it legitly.
And done. Check it out. After a minute. the count is up to 400,000 and going......

2.5Million.
Code:
#include <iostream>
using namespace std;

int main()
{
    int i;
    long int count = 0;
    string banana ="";
    srand((unsigned int)time(NULL));
    while ( banana != "BANANA" )
    {
          for ( i = 0; i < 6; i++ )
          {
              
              int n = rand() % 26;
              char c = (char)(n+65);
              banana += c;
          }
          cout << banana << " ";
          
          if ( banana != "BANANA" )
          {
               banana = "";
               count++;
          }
          cout << count << endl;

    }
    
    system("pause");
    return 0;
}

ok im gunna stop this now it is at 6million lol.

Real experimenters would let it keep running. I'm already at 715,000,000 Tongue
Nelson - Retired TheHostingTool Developer
[Image: sleek.png]
Reply
#12
Real experimenters would add garbage collection. Big Grin
Kevin Mark - TheHostingTool Lead Developer
Reply
#13
(02-17-2010, 08:53 PM)Kevin Wrote: Real experimenters would add garbage collection. Big Grin

Rolleyes
Nelson - Retired TheHostingTool Developer
[Image: sleek.png]
Reply
#14
(02-17-2010, 09:23 PM)Nelson Wrote:
(02-17-2010, 08:53 PM)Kevin Wrote: Real experimenters would add garbage collection. Big Grin

Rolleyes

That was mainly directed @zzbomb and his C++, but ok. Tongue

PS: C# ftw
Kevin Mark - TheHostingTool Lead Developer
Reply
#15
(02-17-2010, 11:26 PM)Kevin Wrote:
(02-17-2010, 09:23 PM)Nelson Wrote:
(02-17-2010, 08:53 PM)Kevin Wrote: Real experimenters would add garbage collection. Big Grin

Rolleyes

That was mainly directed @zzbomb and his C++, but ok. Tongue
I know, Kevin Tongue
Quote:PS: C# ftw
Big Grin
Nelson - Retired TheHostingTool Developer
[Image: sleek.png]
Reply
#16
Grr. Im just learning c++ so whatever.
Reply
#17
mhmm bullies i dont know if i wanna stat :o Lol only jokin Tongue
Reply
#18
I had some problem with 350 MB RAM usage and unlimited execution time, I really need help for this. If any one can suggest me something to this issue.[/align]
Reply
#19
if you want ill leave it going all night if u find a new word let it go upto like 1 billion monkeys im about to buy a new desktop with 8gb ram and 12ghz cpu Smile
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)