#include<stdio.h>
#include<string.h>
int main()
{
char s[100];
int i = 0,length_s,count = 0;
scanf("%s",s);
length_s = strlen(s); //strlen()返回值不包含'\0'
for (i=0;i<length_s;i++)
{
if((s[i]>='a' && s[i]<='z')||(s[i]>='A' && s[i]<='Z'))
//注意'a'<=s[i]<='z'表示的意思是('a'<=s[i])<='z',即使s[i]为数字该表达式的结果也恒成立
printf("%c",s[i]);
}
return 0;
}
0.0分
0 人评分
母牛的故事 (C语言代码)浏览:915 |
A+B for Input-Output Practice (III) (C语言代码)浏览:569 |
C语言程序设计教程(第三版)课后习题6.5 (C语言代码)浏览:586 |
简单的a+b (C语言代码)浏览:572 |
1035 题解浏览:776 |
川哥的吩咐 (C语言代码)浏览:608 |
图形输出 (C语言代码)浏览:936 |
A+B for Input-Output Practice (IV) (C语言代码)浏览:466 |
【偶数求和】 (C++代码)浏览:697 |
简单的a+b (C语言代码)浏览:596 |