Advertisement
Foxyzboi

Untitled

Dec 10th, 2021
900
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.41 KB | None | 0 0
  1. #include <iostream>
  2. #include <windows.h> // библиотека для ввода и вывода русских букв
  3.  
  4. using namespace std;
  5. int main()
  6. {
  7.     char str[256];
  8.     cin.getline(str, 256);
  9.  
  10.     int vCount = 0, cCount = 0;
  11.     for (int i = 0; str[i] != '\0'; i++)
  12.     {
  13.         if (str[i] >= 48 && str[i] <= 57)
  14.         {
  15.             cout << str[i];
  16.         }
  17.     }
  18.    
  19.     return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement