[c언어](연습문제) 복권번호를 출력하는 프로그램

|



4자리 숫자 복권번호를 출력하는 프로그램을 작성하시오. 복권번호의 최소값은 1000이고 최대값은 9999입니다.
프로그램을 실행하고 임의의 키를 누르면 임의의 4자리 복권번호가 출력되도록 작성하시오.

#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
int main(void)
{
    printf("복권추첨을 시작합니다.\n");
    printf("준비되었으면 아무키나 누르세요.\n");
    printf("아무숫자나 입력하고 Enter>>");
    int a;
    scanf("%d", &a);
    printf("천백십일\n");
    printf("%d%d%d%d\n", rand()%9+1, rand()%10, rand()%10, rand()%10);
    printf("당첨번호를 확인하세요.\n");
    return 0;
}

// 실행 결과




   
  ::