Advertisement
Guest User

Untitled

a guest
Mar 30th, 2015
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h> /* srand, rand */
  3. #include <time.h>
  4.  
  5. int main ()
  6. {
  7. int RandomNum;
  8.  
  9. /* Seed the random generator */
  10. srand (time(NULL));
  11.  
  12. /* Generate a number from 1 to 10 */
  13. RandomNum = rand() % 10 + 1;
  14.  
  15. return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement