测评会员优惠活动进行中 · 开通 VIP,有效期内测评不限次 VIP 优惠中 · 测评不限次 立即查看

A61302. (数字删除)下面程序的功能是将字符串中的数字字符删除后输出。请填空。#include <iostream>

填空题

题目描述

(数字删除)下面程序的功能是将字符串中的数字字符删除后输出。请填空。

#include <iostream>
using namespace std;
int delnum(char *s) {
    int i, j;
    j = 0;
    for (i = 0; s[i] != '\0'; i++)
        if (s[i] < '0' (1) > '9') {
           s[j] = s[i];
          (2) ; 
        }
    return (3) ; 
    }
const int SIZE = 30;
int main() {
    char s[SIZE];
    int len, i;
    cin.getline(s, sizeof(s)); 
    len = delnum(s);
    for (i = 0; i < len; i++)
        cout<< (4) ; 
    cout << endl;
return 0; 
}