C# Sharp Exercises: Check if a string is numeric or not
Check Numeric String
Write a C# Sharp program to check if a given string (floating point and negative numbers included) is numeric or not. Return True if the string is numeric, otherwise false.
Sample Data:
("123") -> True
("123.33") -> True
("33/33") -> False
("234234d2") -> False
Sample Solution:
C# Sharp Code:
Sample Output:
Original string: 123 Check if the said string is numeric or not! True Original string: 123.33 Check if the said string is numeric or not! True Original string: 33/33 Check if the said string is numeric or not! False Original string: 234234d2 Check if the said string is numeric or not! False
Flowchart:
C# Sharp Code Editor:
Previous C# Sharp Exercise: String with same characters.
Next C# Sharp Exercise: Prime number in strictly descending decimal digit order.
What is the difficulty level of this exercise?
Based on 1 votes, average difficulty level of this exercise is Hard
.
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics