C examples for Data Type:Random Number
Produces 100 random numbers
#include <stdio.h> #include <stdlib.h> int rnd(void); int main()/* ww w . j ava 2 s . c o m*/ { int x; puts("Behold! 100 Random Numbers!"); for(x=0;x<100;x++) printf("%d\t",rnd()); return(0); } int rnd(void) { int r; r=rand(); return(r); }