第一次发帖问问题,求大佬指导哈!
c4droid吧
全部回复
仅看楼主
level 9
YYYYXoxoxo 楼主
求大佬指导下!
这段代码问题在哪?
小白我表示找不到哪错了啊![疑问][疑问][疑问]
#include<stdio.h>
int main(void) {
char a = 0;
char b = 0;
char c = 0;
there:
printf("enter a letter\n ");
scanf("%c", &a);
switch (a) {
case 'y':
printf("you enterance" "is y");
break;
case 'n':
printf("yuo touch me \n");
break;
default:
printf("\a error\n");
}
printf("\n if yuo want to do this again.\n please enter y.");
scanf("%c", &b);
// scanf("%c", &b);
printf("%c",b);
if (b == 'y') {
printf("%c", b);
goto there;
}
return 0;
}
2017年03月09日 16点03分 1
level 10
char a=0;
这是什么东西
2017年03月10日 02点03分 2
这可以吧!
2017年03月10日 06点03分
反正我试了试不行
2017年03月10日 12点03分
char a='abc';我的只能这样
2017年03月10日 12点03分
或者int a=1;
2017年03月10日 12点03分
level 10
总得说说是什么问题吧
——为什么选择你的会是区区的我呢?
2017年03月10日 12点03分 3
最后一个scanf 好像不能运行,
2017年03月10日 15点03分
@YYYYXoxoxo “//”后面接的是注释内容,当然不能运行了
2017年03月11日 02点03分
@絆色的Haruhi 这我知道,我说的不是这个,它之前的那个scanf
2017年03月11日 03点03分
会不会是应用问题啊!?
2017年03月11日 03点03分
level 11
char a[]="0"
2017年03月11日 03点03分 4
我试过 一样的结果,
2017年03月11日 03点03分
我没想过用数组啊!
2017年03月11日 03点03分
@YYYYXoxoxo 分号。。。
2017年03月11日 03点03分
去掉赋值也一样啊!不是这的问题吧!
2017年03月11日 05点03分
1