TTLC198

lolkek4eburek

Apr 19th, 2021
486
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <string>
  3. #include <sstream>
  4.  
  5. using namespace std;
  6.  
  7. string changeLetters(string word);
  8.  
  9. int main() {
  10.     setlocale(LC_ALL, "Russian");
  11.  
  12.     string input = "МИНИМУМ СОСИСОК", words;
  13.    
  14.     stringstream ss;
  15.  
  16.     ss << input;
  17.  
  18.     while (ss >> words) {
  19.         cout << changeLetters(words) << endl;
  20.     }
  21.  
  22.     return 0;
  23. }
  24.  
  25. string changeLetters(string word) {
  26.     for (int i = 0; i < (int)word.length(); i++)
  27.     {
  28.         if (word[i] == word[0] && i != 0) {
  29.             word[i] = '.';
  30.         }
  31.     }
  32.     return word;
  33. }
  34.  
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×