Come grab your articles on C.. I am a budding engineering grad trying to survive in the world of engineering.. i would love it if you all gave me important topics to cover so that i write in good code and give them to you too!
Sunday, 11 October 2015
Printing Random Numbers
#include <stdio.h>#include <stdlib.h>int main() { int c, n; printf("Ten random numbers in [1,100]\n"); for (c = 1; c <= 10; c++) { n = rand() % 100 + 1; printf("%d\n", n); } return 0;}
No comments:
Post a Comment