| ||||||||||
| 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 | |||||||||
求助!初来乍到,请大家帮我看一看哪里出错,在此谢过!#include<stdio.h>
#define MAXNUM 10
int main()
{
int i=0,j,k;
float input[MAXNUM];
int output;
scanf("%f",&input[i]);
while(input[i])
{
i++;
scanf("%f",&input[i]);
}
for(j=0;j<i;j++)
{
output=1;
k=2;
while(input[j]>(float)1/k)
{
output++;
input[j]-=(float)1/k;
k++;
}
printf("%d card(s)\n",output);
}
return 1;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator