MAP_RAND.C
Upload User: qq5388545
Upload Date: 2022-07-04
Package Size: 29849k
Code Size: 0k
Category:

GUI Develop

Development Platform:

C/C++

  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. void main(void)
  4.  {
  5.    int i;
  6.    printf("Values in the range 0.0 through 1.0n");
  7.    for (i = 0; i < 5; i++)
  8.      printf("%fn", rand() / 32767.0);
  9.    printf("Values in the range -5 to 5n");
  10.    for (i = 0; i < 5; i++)
  11.      printf("%dn", random(10) - 5);
  12.  }