0
HELP PLEASE!
How to make a code for printf 2 random int number ??
4 Respuestas
+ 9
Yes I too know that.. infact I had given a thought back of the mind..but I just felt creepy to show all..
Here is my implementation
https://code.sololearn.com/c0lS8LRAwwCW/?ref=app
Nvm thanks!
+ 8
It's simple make use of rand function.
https://code.sololearn.com/c1pxrotqmFGh/?ref=app
+ 2
EnCoDeR dont forget the srand as well or you might have a fixed seed on the output
here try this
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main() {
srand(time(NULL));
for(int i = 0; i<2; i++)
printf(" %d ", rand());
return 0;
}
+ 1
Thank you very much