| ||||||||||
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 |
c++是不是包括c语言?c语言是不是c++的子集?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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator