Skip to main content
2 of 3
deleted 2 characters in body
user12205
  • 9k
  • 3
  • 33
  • 65

C, 71

Assuming that seeding the rand() function is not required.

k=30;main(i){i=rand()%k;while(k--)printf("%*c\n",i+=rand()%2?1:-1,46);} 
user12205
  • 9k
  • 3
  • 33
  • 65