Valid a Number
Validate if a given string is numeric.
Some examples:
- "0" => true
- " 0.1 " => true
- "abc" => false
- "1 a" => false
- "2e10" => true
- "1 2"=>false // number not separated by space
Input Format
First Line Contain Number of testcase T. Following T line Each Line contain String s. String may be contain a space.
Constraints
1<=T<= 15. S will contain a numeric,alphanumeric,space,dot. if S contain a number then range will be -10^10 to 10^10
Output Format
output Contain a boolean value for each testcase. print true for valid number.otherwise print false
Sample Input 0
5
0
0.1
abc
1 a
2e10
Sample Output 0
true
true
false
false
true
Sample Input 1
5
ab
12
12.456
1.e2
12.e.10
Sample Output 1
false
true
true
true
false
xxxxxxxxxx
10
1
2
3
4
5
6
int main() {
7
8
/* Enter your code here. Read input from STDIN. Print output to STDOUT */
9
return 0;
10
}