#include <stdio.h>
#define SIZE 40 // assume that not more than 40 literals in the input
int main(){
int f=10;
float c;
int value;
int sum;
float resu[SIZE];
int y;
int i;
int isPoint=0;
int value2;
c = getchar();
while ( c != EOF){
if(c='.'){
isPoint=1;
}
if(isPoint!=1){
if(c>='0'&& c <9){
value=(c-'0');
}
}
if (isPoint==1){
if(c>='0'&& c <9){
value2= value2* 10+(c-'0');
f=f*10;
sum=sum+value2;}
}
if (c ==' ' || c == '\n') {
resu[y]=value +(float)sum/f;
y++;
f=10;
sum=0;
value=0;
isPoint=0;
}
c = getchar();
}
printf("-\n");
for(i=0; i<y;i++)
printf("%.4f\t%.4f\n", resu[i],resu[i] *2);
return 0;
}
我想把输入的浮点数变为输入值的两倍, 可是运行时无法输出 这是什么原因呀