*数组-01. 字符转换

 1 /*
 2  * Main.c
 3  * E1-数组-01. 字符转换
 4  *  Created on: 2014年8月20日
 5  *      Author: Boomkeeper
 6  ******部分通过**********
 7  */
 8 
 9 #include <stdio.h>
10 
11 int main(void) {
12 
13     char str[80] = { -1 };
14 
15     gets(str);
16 
17     int i;
18     for (i = 0; i < 80; i++) {
19         if (str[i] >= '0' && str[i] <= '9')
20             putchar(str[i]);
21     }
22     putchar('
');
23 
24     return 0;
25 }

题目链接:

http://pat.zju.edu.cn/contests/basic-programming/%E6%95%B0%E7%BB%84-01

.

原文地址:https://www.cnblogs.com/boomkeeper/p/E1.html