Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <iostream>
- #include <string>
- #include <locale>
- using namespace std;
- void main()
- {
- setlocale(LC_ALL, "Russian");
- string str = "Добро пожаловать в мой дом - как жаль, что я вам не очень рад";
- if (str.substr(0, str.find(" - ")).length() > str.substr(str.find(" - ") + 3).length()) {
- cout << "Первая часть больше" << endl;
- }
- else {
- cout << "Вторая часть больше" << endl;
- }
- system("pause");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement