I am stumped on this one. I tried two methods and something just doesn't
seem right. I'll try my new syle.
#include <stdio.h>
#include <stdlib.h>
main() {
srand(2000); /*seed unsigned */
printf("%u",ran d());
}
Now I get a number much larger than 2000. Also when I also try RAND_MAX with
srand from time to time.
With main I was always told int was the default type and didn't need to be
declared. Main() has always worked. I hope this code is much more readable.
Bill
seem right. I'll try my new syle.
#include <stdio.h>
#include <stdlib.h>
main() {
srand(2000); /*seed unsigned */
printf("%u",ran d());
}
Now I get a number much larger than 2000. Also when I also try RAND_MAX with
srand from time to time.
With main I was always told int was the default type and didn't need to be
declared. Main() has always worked. I hope this code is much more readable.
Bill
Comment