- 博客(6)
- 问答 (4)
- 收藏
- 关注
原创 完整版猜数游戏,包含用户猜,计算机猜
#include<stdio.h>#include<time.h>#include<stdlib.h>int main(){ int guess,count=0; while(1){ char a; srand(time(NULL)); guess=rand()%100+1; printf("A.用户猜\n"); printf("B.计算机猜\n"); printf("C.退出游戏\n"); printf("请输入你的选
2021-01-22 10:15:48
470
原创 写了个函数,输入字符数组,将大写字母变小写,请问各位大佬我哪出错了?
#include<stdio.h>#define N 30char change(char b[],int n);void readb(char b[],int n);void main(){ char b[N]; int n; printf("input n:"); scanf(" %c",&n); b[N]=change(b,n); readb(b,n); printf("%c",&b[N]);}char change(char b[]){
2021-01-21 12:04:18
212
原创 如何执行完一次功能后不退出,继续执行,求各位大佬赐教,告诉我具体怎么做?
#include<stdio.h>#include<time.h>#include<stdlib.h>int main(){ int guess; srand(time(NULL));guess=rand()%101; srand((unsigned int)time(0)); char a; printf("A.用户猜\n"); printf("B.计算机猜\n"); printf("请输入你的选择:"); scanf("%c",&
2020-12-19 13:50:41
667
2
原创 2020-12-19
#include<stdio.h>#include<time.h>#include<stdlib.h>int main(){ int guess; srand(time(NULL));guess=rand()%101; srand((unsigned int)time(0)); char a; printf("A.用户猜\n"); printf("B.计算机猜\n"); printf("请输入你的选择:"); scanf("%c",&am
2020-12-19 07:38:44
943
3
原创 2020-12-15
#include<stdio.h>#include<stdlib.h>#include<time.h>int main(){ int A; printf("你想自己猜(1)还是让计算机(2)猜呢?"); scanf("%d\n",&A); switch(A) {case 1: printf("请输入您要猜的数字:"); while(1) { int guess=rand()%100+1; int c; int num=0;
2020-12-15 15:32:19
111
2
空空如也
生成随机数字和字母,并将其连接起来(编译通过了,运行没效果是怎么回事)
2021-08-25
messagebox如何像printf(”%s %s“,a,b);一样输出变量信息
2021-08-17
用easyx给猜数游戏做图形界面 输入任何数总是显示低了重新输入
2021-08-08
easyx图形界面出错
2021-08-04
TA创建的收藏夹 TA关注的收藏夹
TA关注的人