啊哈磊_编程从这里起步
标题:
help!!!~
[打印本页]
作者:
nana111
时间:
2013-12-24 22:09
标题:
help!!!~
#include <stdio.h>
void main()
{ char *s="COMPUTER";
char c;
printf("which style do you want to:\n");
printf("Capital (c) or uncapital (a):");
c=getchar();
if(c='c')
puts(s);
else
{ s="computer";
puts(s);
}
}
复制代码
为什么输入c以外的字母,结果还是COMPUTER?
作者:
4399APPLE
时间:
2013-12-24 22:09
#include <stdio.h>
void main()
{ char *s="COMPUTER";
char c;
printf("which style do you want to:\n");
printf("Capital (c) or uncapital (a):");
c=getchar();
if(c=='c')
puts(s);
else
{ s="computer";
puts(s);
}
}回贴时请遵守当地法律哦。
复制代码
作者:
超神级
时间:
2013-12-24 23:31
八行..
欢迎光临 啊哈磊_编程从这里起步 (https://bbs.codeaha.com/)
Powered by Discuz! X3.2