题目
判断输入的字符串是否是数字
输入
0
0.1
abc
1 a
2e10
输出
YES
YES
NO
NO
YES
分析
可以直接使用标准库函数strtod()
代码
#include <iostream>
#include <string>
#include <cstdlib>
using
判断输入的字符串是否是数字
输入
0
0.1
abc
1 a
2e10
输出
YES
YES
NO
NO
YES
可以直接使用标准库函数strtod()
#include <iostream>
#include <string>
#include <cstdlib>
using