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