——吧里有谁会C语言的吗?——
灵蛇禁区吧
全部回复
仅看楼主
level 9
当年的妖 楼主
RT
2012年03月02日 09点03分 1
level 9
当年的妖 楼主
问个问题
2012年03月02日 09点03分 2
level 9
当年的妖 楼主
关于二重循环的
2012年03月02日 09点03分 3
level 5
知道点请说
2012年03月02日 09点03分 4
level 9
当年的妖 楼主
5位数1_4_7,是57或67的倍数,求这种5位数的个数
我这样的代码不知道什么错误:
#include <stdio.h>
void main ()
{
int c=0,i,j;
long int n=10407+1000*i+10*j;
for(i=0;i<=9;i++)
{
for(j=0;j<=9;j++)
{
n%57==0 || n%67==0;
c=c+1;
}
}
printf("c=%d\n",c);
}

2012年03月02日 09点03分 5
level 15
[揉脸]完全不懂的路过[打酱油]
2012年03月02日 09点03分 6
level 9
话说C语言的话,我也弄过一点,但都是最最基础的,没坚持下去....
2012年03月02日 09点03分 7
level 5

#include <stdio.h>
void main ()
{
int c=0,i,j;
long int n;
for(i=0;i<=9;i++)
{
for(j=0;j<=9;j++)
{
n=10407+1000*i+10*j;
if( (n%57==0) || (n%67==0))
c=c+1;
}
}
printf("c=%d\n",c);
}
大概是吧,好久没有用了,上机调试下试试
2012年03月02日 09点03分 8
level 9
当年的妖 楼主
好吧= =
2012年03月02日 09点03分 9
level 9
当年的妖 楼主
行了,谢谢[Kiss]
2012年03月02日 09点03分 10
level 5
不会吧我都不相信一下就能成功了,小小得意下嘿嘿
2012年03月02日 09点03分 12
level 9
当年的妖 楼主
是我搞错了,爱你[我爱牛奶]
2012年03月02日 09点03分 13
level 9
当年的妖 楼主
还行
2012年03月02日 09点03分 14
level 12
亲 我正在学呢
2012年03月02日 09点03分 15
level 9
当年的妖 楼主
解决啦[背扭]
2012年03月02日 09点03分 16
level 12
好吧 我还需要努力
2012年03月02日 09点03分 17
level 9
当年的妖 楼主
谢谢你的心意了[Kiss]
2012年03月02日 09点03分 18
level 12
[害羞]
2012年03月02日 09点03分 19
level 10
不懂得路过,我连vb都不明白
2012年03月02日 09点03分 20
level 9
当年的妖 楼主
解决了嘿嘿
2012年03月02日 09点03分 21
1 2 3 尾页