标题:字符型可以自动累加吗?
只看楼主
栖柏
Rank: 2
等 级:论坛游民
威 望:3
帖 子:1103
专家分:17
注 册:2007-8-23
得分:0 
#include <stdio.h>
int main()
{
int num,num1;
char x;
for(num1=1;num1<=7;num++);
{
for (num=1;num<=7-1;x++); // <---- the cpu must be very busy here
printf(" ");
scanf("%c",&x);//不需要了吧
for(x='A';x<='G';x++);
printf("%c",x);
printf("\n");
}
return 0;
}
你的程序本身就有问题

You have lots more to work on! Never give up!c language!
2007-08-24 16:05
zpl1025
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2007-8-21
得分:0 
回复:(zzxwill)我的程序也能达到要求,但是考虑当i=...
i counts from 0 to 6
and when i=6, no ' ' outputed.
nothing more but normal
2007-08-24 16:07



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-164689-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.311902 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved