void main(){
char a[12];
int k=1;
int t;
int j=0;
for(int i=0;i<3;i++)
cin>>a[i];
for(i=0;i<3;i++)
if(a[i]='.')
{
++j;
if(j>1)
k=0;
else
t=0;
}
else if(a[i]<'0'||a[i]>'9')
k=0;
cout<<k<<endl;
}
char a[12];
int k=1;
int t;
int j=0;
for(int i=0;i<3;i++)
cin>>a[i];
for(i=0;i<3;i++)
if(a[i]='.')
{
++j;
if(j>1)
k=0;
else
t=0;
}
else if(a[i]<'0'||a[i]>'9')
k=0;
cout<<k<<endl;
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货