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

int main() {
    srand(time(NULL));  // 난수 초기화
    printf("1~5사이의 랜덤한 수 : %d\n", rand() % 5+1); // 랜덤 한 수 선택(1~적은수 보다 1적은수로 됨)
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: