|
|
1.1 ! root 1: #include <stdio.h> ! 2: ! 3: char *line[500] = { ! 4: "Thank you", ! 5: "I'm greatly in your debt", ! 6: "My gratitude overflows", ! 7: "Words cannot express my thanks", ! 8: "I am touched by your thoughtfulness", ! 9: "Gracias", ! 10: "Profoundest Gratitude", ! 11: "Vielen Dank", ! 12: "Merci", ! 13: "wanna buy a plant?", ! 14: "We lie under your obligation", ! 15: "I will never forget your kind action", ! 16: "Gramercy", ! 17: "Much Obliged", ! 18: "Wherever did you find it?", ! 19: "I used to play with one of those in my highchair", ! 20: "Didn't you save the receipt?", ! 21: "Why, this is the one I gave you last year", ! 22: "Why, this is just like the one you gave me last year", ! 23: "Oh my, I could never sleep in something like that", ! 24: "You must have spent hours sewing all those eyes on the ends of its tentacles", ! 25: 0 }; ! 26: ! 27: main() ! 28: { ! 29: register char * l; ! 30: long t; ! 31: int n, i; ! 32: ! 33: time(&t); ! 34: srand(getpid() + (int)((t>>16) + t)); ! 35: for( n=0; line[n]; ++n ) { ; } ! 36: for(;;) { ! 37: i = rand(); ! 38: i = (i/32768.)*n; ! 39: if( i==n ) i = n-1; ! 40: else if( i>n || i<0 ) fprintf( stderr, "bad rand: %d", i ); ! 41: printf( "%s!\n", line[i] ); ! 42: } ! 43: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.