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

Re:请教if(cin)/ if(scanf)的具体用法!

Posted by hong_liming at 2003-07-06 22:45:29 on Problem 1000
In Reply To:请教if(cin)/ if(scanf)的具体用法! Posted by:waterine at 2003-07-06 20:36:46
我是这么用的
void main()
{
	do
	{
		cin>>.......
		if(!cin)break;
		//processing.....
	}while(true);
}

至于scanf(),返回值应该是实际读入数据项的个数,如果返回零就表示没有读入任何数据

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