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

c++是不是包括c语言?c语言是不是c++的子集?

Posted by 2571111 at 2008-11-09 09:08:05
1003提交时先择c语言就通过了,选择c++则编译错误。
代码如下:
#include<stdio.h>
void main()
{
	int i;
	float x,k;
	scanf("%f",&k);
	while(k!=0.0)
	{
		x=0.0;
	for(i=1;x<k;i++)
		x=x+1.0/(i+1);
	printf("%d card(s)\n",i-1);
	scanf("%f",&k);
	}
}

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