Answers for "how to generate random between 0 and 9 in c"

0

how to generate random between 0 and 9 in c

#include <stdio.h>
#include <stdlib.h>

int main()

{
    int randomnumber;
    srand(time(NULL));
    randomnumber = rand() % 10;
    printf("%d\n", randomnumber);
    return 0;
}
Posted by: Guest on May-17-2020
0

how to generate random between 0 and 9 in c

#include <stdio.h>
#include <stdlib.h>

int main()

{
    int randomnumber;
    srand(time(NULL));
    randomnumber = rand() % 10;
    printf("%d\n", randomnumber);
    return 0;
}
Posted by: Guest on May-17-2020

Code answers related to "how to generate random between 0 and 9 in c"

Browse Popular Code Answers by Language