Advertisement
35657

Untitled

Apr 19th, 2024
547
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.32 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main() {
  6.     setlocale(LC_ALL, "ru");
  7.    
  8.     char line[100];
  9.  
  10.     gets_s(line);
  11.  
  12.     int num = strlen(line);
  13.  
  14.     cout << "Занято: " << num + 1 << ". Свободно: " << 100 - num - 1 << endl; // с учетом символа конца строки
  15.  
  16. }
  17.  
  18.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement