Define a C++ language float literal using regular expression. A float literal in C language has an optional exponent part. If a float literal is written without exponent part, then it must have a decimal point which can appear at the start, at the end or in the middle of digits, as in following examples: 123.456 .456 456. If float literal is written with exponent, then decimal point in mantissa part is optional, and exponent is a whole number with optional sign, as in following examples: 123e78 123e+78 123e-78 123.456e78 .456e78 456.e78
Define a C++ language float literal using regular expression. A float literal in C language has an optional exponent part.
If a float literal is written without exponent part, then it must have a decimal point which can appear at the start, at the end or in the middle of digits, as in following examples:
123.456
.456
456.
If float literal is written with exponent, then decimal point in mantissa part is optional, and exponent is a whole number with optional sign, as in following examples:
123e78
123e+78
123e-78
123.456e78
.456e78
456.e78
Step by step
Solved in 2 steps