正在加载图片...
#include <iostream> #include <ctype.h> using namespace std; int main() int count[26]{o),i; char ch; ch toupper(cin.get(); while (ch>='A'&&ch <='Z') {++count[ch-'A'];ch toupper(cin.get()); for(i=0;i<26;++i) cout <count[i]<'It'; return 0; 3 LoCcS#include <iostream> #include <ctype.h> using namespace std; int main() { int count[26] = {0}, i; char ch; ch = toupper(cin.get()); while (ch>='A' && ch <='Z') {++count[ch-'A']; ch = toupper( cin.get()); } for (i=0; i< 26; ++i) cout << count[i] << '\t'; return 0; }
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有