| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
SOS SOS 哪个 大牛 帮我看 一下
偶不知错在哪
输出后就是不能运行 没有OUTPUT
#include <stdio.h>
void main()
{
float a[10];
int b[10],i,j,t;
for(i=0; ;i++)
{
scanf("%f",&a[i]);
if(a[i]==0)
break;
}
for(i=0;a[i]!=0;i++)
{
t=0;
for(j=2; ;j++)
{
t+=1/j;
if(t>a[i])
continue;
}
b[i]=j-1;
}
for(i=0;a[i]!=0;i++)
printf("%d card(s)\n",b[i]);
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator