fork(1) download
  1. #include <iostream>
  2. #include <string>
  3. #include <cctype>
  4. using namespace std;
  5.  
  6. int main() {
  7. string s, n;
  8. char ch;
  9. getline(cin, s);
  10. for(int i = 0; i < s.length(); i++)
  11. {
  12. if ( isdigit(s[i]))
  13. {
  14. n += "*";
  15. }
  16. else
  17. {
  18. n += s[i];
  19. }
  20. }
  21. cout << n << endl;
  22. return 0;
  23. }
Success #stdin #stdout 0s 3232KB
stdin
456789п
stdout
 *  *  *  *  *  * п