Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

[New] ITT We determine if your programs halt

Name: Anonymous 2010-06-18 2:22

Give us your programs, and we'll tell you if they halt!

Bring em on!

Name: Anonymous 2010-06-18 12:19

#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main()
{
   srand(time(NULL));
   float a, b, c, d;
   while(true)
   {
      a = (float)rand();
      b = (float)rand();
      c = (float)rand();
      d = (float)rand();
      if((a/b) == (c/d))
      {
         break;
      }
   }
   printf("Halt!")
   return 0;
}

Actually, I don't think this will work ...

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List