Description
输入一字符串,判断它是不是浮点数形式(定点形式或科学记数形式),是则输出YES;否则输出NO。如输入" 123"、或"123.57"、"123e12",”+1.2E+3”, 则输出YES。如输入" 123A"、或"123.57.89",则输出NO。
Input
字符串(答案后不用换行回车)
Output
YES或NO(其前后不留空格)
Sample Input
-123456789.0e+2 -123456789.0e+2.2
Sample Output
YES NOSource:
#include<iostream>
using namespace std;
char str[10000];
int fun()
...{
int i;
int p=0,q=0;
for(i=0;str[i]!='