哪儿错了?
c语言吧
全部回复
仅看楼主
level 2
c狂人 楼主
学了这么多天C还是没进展这不又遇到简单的却做不起来,题目:求小于n的所有各位不等于9的素数,n由用户输入#include"stdio.h"main()long int n;int i,j;printf("please input n:");scanf("%d",&n);if(n<=2)printf("no number putout");for(i=2;i
2004年11月28日 06点11分 1
level 7
main()少了{
2004年11月28日 07点11分 2
level 2
c狂人 楼主
这个是我刚刚写错了别的还有什么地方错啊帮忙看一下
2004年11月28日 07点11分 3
level 0
for(j=1;j
2004年11月28日 07点11分 4
level 2
c狂人 楼主
不对呀加了怎么还是没用啊
2004年11月28日 08点11分 5
level 0
printf"%d",i);这个野错?改为printf("%d",i);
2004年11月28日 08点11分 6
level 2
c狂人 楼主
太粗心了不过其他地方肯定还有错
2004年11月28日 08点11分 7
level 0
#include"stdio.h"main(){long n,i,j;printf("please input n:");scanf("%d",&n);if(n<=2){printf("no number putout"); break;}{for(i=2;i
2004年11月28日 08点11分 8
level 2
c狂人 楼主
8:break只能用于循环语句, if是条件语句很显然不对不知道应该怎么改才可以?。。。。。。。。。
2004年11月28日 08点11分 9
level 0
晕啊,if(i%j==0) break;if(i%j!=0&&i%10!=9)printf("%d",i);}那个break;退到这了,有问题吗?
2004年11月28日 11点11分 10
level 0
c狂人,粗心错误可不能这么多啊。得好好练练才行。别的错误我愿意看看,粗心的实在不想看,越看越恼火。
2004年11月28日 12点11分 11
level 0
把break;改成continue;
2004年11月29日 00点11分 12
level 1
看看下面的代码:(2没有考虑进去)#include"stdio.h"main(){long int n;int i,j,k;printf("please input n:");scanf("%d",&n);if(n<=2)printf("no number putout");for(i=2;i
2004年12月06日 05点12分 13
level 1
仔细分析一下程序运行情况你的程序break用的不恰当,按照你的代码程序for(j=1;j
2004年12月06日 05点12分 14
level 0
呵14楼的说的不错,呵
2004年12月09日 07点12分 15
level 0
这么简单的错误都找不到吗?还是让老师告诉告诉你吧,你仔细看看你赋值的地方!!!尤其是标点符号!!!
2004年12月10日 02点12分 16
1