| ||||||||||
| 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>
void main()
{
float a[5];
int i,j;
for(i=0;i<=4;i++)
scanf("%f",&a[i]);
for(j=0;j<=4;j++)
{
int n=0;
float b=0.00;
for(;b<a[j];n++)
{
if(a[j]==0)
continue;
else
b+=1/(n+2);
}
printf("%d card(s)\n",n);
}
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator