Proszę wykonać zadanie z załącznika w języku c++.

Odpowiedź:
#include <iostream>
#include <string>
#include <algorithm>
int main() {
std::string word;
std::getline(std::cin, word);
std::reverse(word.begin(), word.end());
std::cout << word;
return 0;
}
Wyjaśnienie: