C/C++ 언어 rand() 함수를 이용한 예제 프로그램 


1
2
3
4
5
6
7
8
9
10
11
#include <stdio.h>
#include <stdlib.h>
 
void main(void) {
 
  int i;
  printf("0 ~ 32767 : \n");
  for (i = 1; i <= 5; i++)
    printf("%d : %d\n",i, rand());
}
 
cs


C/C++ 언어 rand() 함수를 이용한 예제 프로그램 



+ Recent posts