1130: C语言训练-数字母 ->使用ASCII码
摘要:```python
s=input()
count=0 #计数
for i in s:
#使用ASCII码,1~9的十进制ASCII码值为48~57
if ord(i)>……
1130: C语言训练-数字母
摘要:此题关键是使用isalpha()函数,注意读数据使用getline()。(尽管使用cin也能过)#include<bits/stdc++.h>
using namespace std;
int m……
1130好心疼C语言
摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>#include<ctype.h> int main(){ char str[……
1130: C语言训练-数字母-题解(python)
摘要:解题思路:注意事项:参考代码:import stringa = string.ascii_lettersb = input()m = 0for i in b: if i in a: ……
使用gets()获取整行输入
摘要:```c
# include
# include
int main(void){
char a[100];
gets(a);
int sum=0;
for……
数字母(输入一串字符串统计字母个数)
摘要:解题思路:第一不用输字母,可以选择gets或者scanf函数,用for循环和if语句判断,统计个数注意事项:把大小写都要统计参考代码:#include<stdio.h>#include<string.……