Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

SOS SOS

Posted by yujiashan at 2006-07-13 11:40:16 on Problem 1003
  哪个 大牛 帮我看 一下 
     偶不知错在哪  
    输出后就是不能运行  没有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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator