#include#include #include void game(){ int num=0; int ret =0; srand((unsigned int)time(NULL)); ret=rand; ret=ret%100; printf("请输入你要猜的数字\n"); while(1) { scanf("%d",&num); if(num==ret) { printf("恭喜您答对了\n"); break; } else if (num
本文共 341 字,大约阅读时间需要 1 分钟。
#include#include #include void game(){ int num=0; int ret =0; srand((unsigned int)time(NULL)); ret=rand; ret=ret%100; printf("请输入你要猜的数字\n"); while(1) { scanf("%d",&num); if(num==ret) { printf("恭喜您答对了\n"); break; } else if (num
转载于:https://blog.51cto.com/10740329/1702997