jal hace 5 años
padre
commit
47ff83ffb4
Se han modificado 1 ficheros con 17 adiciones y 0 borrados
  1. 17 0
      C.cpp

+ 17 - 0
C.cpp

@@ -0,0 +1,17 @@
+#include<bits/stdc++.h>
+using namespace std;
+
+int main(){
+	string s;
+	while(getline(cin, s)){
+		int a = 0, b = 0, c = 0, d = 0;
+		for(int i = 0; i < s.size(); i++){
+			if(isalpha(s[i]))a++;
+			else if(isspace(s[i]))b++;
+			else if(isdigit(s[i]))c++;
+			else d++;
+		}
+		cout << a << " " << c << " " << b << " " << d << endl;
+	}
+	return 0;
+}