#include <iostream>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
string s;
while (getline(cin, s)) {
if (s.length() == 0) break; //์
๋ ฅ์ด ์์๋ ์ข
๋ฃ
int lower=0, upper = 0, number=0, empty = 0;
for (int i = 0; i < s.length(); i++) {
if (s[i] >= 'A' && s[i] <= 'Z') upper++;
else if (s[i] >= 'a' && s[i] <= 'z') lower++;
else if (s[i] >= '0' && s[i] <= '9') number++;
else if (s[i] == ' ') empty++;
}
cout << lower << ' ' << upper << ' ' << number << ' ' << empty << '\n';
}
}
'Algorithm ๐ง๐ปโ๐ป > ๋ฐฑ์ค(BOJ)' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[๋ฐฑ์ค,c++] 10824๋ฒ - ๋ค ์ (0) | 2021.10.25 |
---|---|
[๋ฐฑ์ค,c++] 10823๋ฒ - ๋ํ๊ธฐ2 (0) | 2021.10.24 |
[๋ฐฑ์ค,c++] 10822๋ฒ - ๋ํ๊ธฐ (0) | 2021.10.24 |
[๋ฐฑ์ค,c++] 10819๋ฒ - ์ฐจ์ด๋ฅผ ์ต๋๋ก (0) | 2021.10.24 |
[๋ฐฑ์ค,c++] 10818๋ฒ - ์ต์, ์ต๋ (0) | 2021.10.24 |
[๋ฐฑ์ค,c++] 10817๋ฒ - ์ธ ์ (0) | 2021.10.24 |
๋๊ธ