Home > other >  About KEIL5.23 version called random function rand () is not random number generation, seek a soluti
About KEIL5.23 version called random function rand () is not random number generation, seek a soluti

Time:09-26

# include & lt; Stdlib. H>
# include & lt; Stdio. H>/* for printf */

Void tst_rand (void) {
int i;
Int r;

For (I=0; i <3; I++) {
R=rand () % 3.//debugging without the data,
Printf (" I=% d, RAND=% d \ n ", I, r);

}
}
I use stm32f103c8 debugging need any number between 0 and 1, online a lot of methods are not, rand () function in the PC, used in keil5 don't know how to use the
Not solve the problem have know how to solve,
  • Related