• Помогите с заданием, пожалуйста.
    С++
    Дана строчка. Вывести слова строчки в обратном порядке.

Ответы 1

  • #include "stdafx.h"#include <iostream>#include <sstream>using namespace std;int main(){ string str; string inpstr; string outstr; stringstream oss; cout << "Vvodite stroku ->" << endl; getline(cin, inpstr, ''); oss << inpstr; outstr.clear(); while (!oss.eof()) { oss >> str; if (str.size()) outstr = str + ' ' + outstr; } cout << outstr << endl; system("pause"); return 0;}
    answer img
  • Добавить свой ответ

Войти через Google

или

Забыли пароль?

У меня нет аккаунта, я хочу Зарегистрироваться

How much to ban the user?
1 hour 1 day 100 years