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

infinite loop

Name: Anonymous 2007-03-16 13:30 ID:Nj7svKi5

Hi I tried this but it doesn't compile, what am i doing wrong??


void main()
{
  char c;
  printf("I'm thinking of a number. Please guess it: ");

  for (int i=0;i<∞;i++) {
    c = getchar();
    putchar(c);
    if (c == '\n')
    {
      printf("Wrong! Try again: ");
    }
  }
}

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