Random 0 To 10 C

[Solved] Random 0 To 10 C | Csharp - Code Explorer | yomemimo.com
Question : how to generate random between 0 and 9 in c

Answered by : helpless-hornet-bffjx3vogid5

#include <stdio.h>
#include <stdlib.h>
int main()
{ int randomnumber; srand(time(NULL)); randomnumber = rand() % 10; printf("%d\n", randomnumber); return 0;
}

Source : https://stackoverflow.com/questions/17846212/generate-a-random-number-between-1-and-10-in-c | Last Update : Sun, 24 May 20

Question : random 0 to 10 c

Answered by : terrible-termite-ykzmv527pucl

#include <stdio.h>
#include <stdlib.h>
int main()
{ int randomnumber; randomnumber = rand() % 10; printf("%d\n", randomnumber); return 0;
}

Source : https://stackoverflow.com/questions/17846212/generate-a-random-number-between-1-and-10-in-c | Last Update : Sun, 10 Apr 22

Answers related to random 0 to 10 c

Code Explorer Popular Question For Csharp