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

28th Sep 2020, 3:42 PM
Sherry_Lim
Sherry_Lim - avatar
3 odpowiedzi
+ 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.
29th Sep 2020, 2:51 AM
Brian
Brian - avatar
0
Please code with C
28th Sep 2020, 3:42 PM
Sherry_Lim
Sherry_Lim - avatar