[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/AndyleeSharp/leetcode/master/src/validNumber/validNumber.cpp [Back]  [Original]

// Source : https://oj.leetcode.com/problems/valid-number/
// Author : Hao Chen
// Date   : 2014-08-26

/********************************************************************************** 
* 
* Validate if a given string is numeric.
* 
* Some examples:
* "0" => true
* "   0.1  " => true
* "abc" => false
* "1 a" => false
* "2e10" => true
* 
* Note: It is intended for the problem statement to be ambiguous. 
*       You should gather all requirements up front before implementing one.
* 
*               
**********************************************************************************/

#include 
using namespace std;


bool isdigit(const char c){
    return (c>='0' && c

Web Proxy Viewer  |  New URL  |  Original Page