Advertisement

每日一题--20200406--提取数字信息

阅读量:

开发一个应用程序用于从包含数字字符与非数值字符的字符串中提取出所有的整数部分(例如:当输入asd123,34fgh_566kkk789时,则该程序将识别出的整数包括123、34以及789这三个数值信息)

开发一个应用程序用于从包含数字字符与非数值字符的字符串中提取出所有的整数部分(例如:当输入asd123,34fgh_566kkk789时,则该程序将识别出的整数包括123、34以及789这三个数值信息)

输入格式要求:提示信息:“Please enter a string:”
输出格式要求:“the result of output:\n” " %10****d
\n"
程序运行示例如下:
Please enter a string:
abc123def456ghi111bbbccc99go100
the result of output:
123
456
111
99
100

注意事项 :格式!!按格式输出太难;99前面是有空一格的

复制代码
    #include <stdio.h>
    #include <string.h>
    int main ( )
    {
    printf("Please enter a string:");
    char arr[100];
    ch

全部评论 (0)

还没有任何评论哟~