Random numbers

Random Numbers in C #include
#include

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;
}

Comments

comments

Leave a Reply

Your email address will not be published. Required fields are marked *