| ||||||||||
| 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 | |||||||||
怎么连scanf都出错啊#include <stdio.h>
#include <stdlib.h>
int main()
{
float c[100];
float sum=0.00;
int i=1,n,j=2;
do
{scanf("%f\n",&c[i]);printf("%d\n",i);
i++;printf("%d\n",i);
}
while(c[i-1]!=0.00);
n=i-1;
for(i=1;i<n;i++)
{while(sum<c[i]){
sum+=1/j;
j++;
}
printf("%d\n",j-2);}
}
第一次送数据进去,后面的printf根本都没反应啊
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator