0
How to output string without num
Here , I mean if I typed whaysuss1228388,I wish it only output whaysuss ,no numbers!Anyone can teach me how to write it? I have no clue:poease
3 Answers
+ 1
Shirt, try to write a loop that compares each character within the string against the range of numeric characters (between '0' and '9'). Print each character only if it is outside that range.
If you #include <string.h> then you can use the function, isdigit(), to do the numeric test for you. Also the strlen() function might be useful to determine the loop limit. Alternatively, your loop can test for the character being 0 (NULL), which marks the end of a string in C.
0
Please code with C