完成猜数字游戏
#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<stdlib.h>
#include<time.h>
int d5p1()
{
srand((unsigned int)time(NULL));
int s = rand() % 100 + 1;
int tmp = 0;
while (tmp != s)
{
scanf("%d", &tmp);
if (tmp < s)
{
printf("猜小了!n");
}
if (tmp > s)
{
printf("猜大了!n");
}
}
printf("猜对了!n");
system("pause");
return 0;
}
最后
以上就是愤怒板栗最近收集整理的关于无题的全部内容,更多相关无题内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复