#include<stdio.h>
#include<stdlib.h>
void main()
{
int guess,magic;
magic=rand(); /*获取一个随机数*/
printf("请输入你猜的数字:");
scanf("%d",&guess);
if(guess==magic)
printf("很遗憾,猜错了!\n");
else
printf("恭喜你,猜对了!\n");
}