#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int dice()
{
return rand() % 6 + 1;
}
int main()
{
int guess;
srand(time(NULL));
int diceResult = dice();
printf("μ£Όμ¬μ μ«μ λ§νκΈ° κ²μμ μμν©λλ€.\n");
printf("μ£Όμ¬μλ₯Ό λμ Έ λμ¬ μ«μλ₯Ό λ§ν보μΈμ.(1μμ 6κΉμ§): ");
scanf("%d", &guess);
printf("μ£Όμ¬μ κ²°κ³Ό: %d\n", diceResult);
if (guess == diceResult)
{
printf("μΆνν©λλ€! μ«μλ₯Ό λ§νμ΅λλ€.\n");
}
else
{
printf("μμ½μ΅λλ€. λ€μ μλνμΈμ.\n");
}
return 0;
}