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

那位高人能帮我看看那错了

Posted by aiyinsitan at 2006-07-02 00:30:50
#include "stdafx.h"
#include<iostream>
using namespace std;


int main(int argc, char* argv[])
{
	float x,t;
	float i; 
	cin>>x;
	while(x)
	{
		t=0;
		for(i=2;;i+=1)
		{
			t+=1/i;
		 if(x<=t)
		break;
		}
		cout<<(i-1)<<" "<<"card(s)"<<endl;
		cin>>x;
	}


	return 0;
}

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