Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- int main(){
- setlocale(LC_ALL, "Russian");
- string input;
- getline(cin, input);
- int symbols = 0;
- for(int i = 0; i < input.length(); i++){
- if((input[i] >= 'a' && input[i] <= 'z') || (input[i] >= 'A' && input[i] <= 'Z')){
- cout<<"_";
- symbols++;
- }
- else{
- cout<<' ';
- }
- }
- cout<<"\nКоличество латинских букв "<<symbols;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement