1樓:___丶
#include
#include
void main()
printf("字母的個數:%d\n空格的個數:%d\n數字的個數:%d\n其他字元個數:%d\n",n1,n2,n3,n4);}
2樓:
供參考……
#include "stdafx.h"
#include "stdio.h"//
#include "string.h"//
void main(void)
printf("1234 static:\n");
printf("there are %d alphabet characters\n",alp);
printf("there are %d number characters\n",num);
printf("there are %d space characters\n",spa);
printf("there are %d others characters\n",oth);}
編寫函式,統計給定字串中各個字母出現的次數,不區分大小寫
比如對hello,tom 進行統計 void count chars char s,int t main int i count chars s,ts for i 0 i 26 i 編寫函式,統計給定字串中各個字母出現的次數,不區分大小寫。比如對hello,tom 進行統計 void count c...
用python統計從鍵盤上輸入的字串中英文字母a z出現的
s input lower result e,s.count e for e in set list s print result python,編寫程式,統計大小寫字母,數字及其他字元的數量,並以字典形式輸出 a aa r3idd4bgs7dlsf9eaf 請將a字串的數字取出,並輸出成一個新的字...
求字母在字串中的出現頻率,用iostreram h,cin,cout,不用scanf,printf
include using namespace std void main cout include include include include include include include include include include include include include inc...