Дата активности | Консольный раздел | Прогресс | ||
---|---|---|---|---|
2021-03-08 | book | 000. Строки | 75 % | |
Итого: | 75 % |
//c++
#include <iostream>
#include <string>
using namespace std;
int main () {
string s;
getline (cin, s);
int first = s.find_first_of ("(");
int second = s.find_first_of (")", first + 1);
cout << s.substr(first + 1, second - first - 1);
return 0;
}
#include <iostream>
#include <string>
using namespace std;
int main () {
string name;
string line;
getline(cin, name);
getline(cin, line);
cout << name.length() << " " << line.length();
return 0;
}