Dodaj #include <conio.h>
jak i przed return dodaj _getch(); (lub getch())
#include <iostream>
#include <conio.h>
using namespace std;
int main()
{
string wyraz;
cout<<"Podaj wyraz do odwrocenia: ";
cin>>wyraz;
int dlugosc = wyraz.length();
for(int i=dlugosc-1; i>=0; i--)
{
cout<<wyraz[i];
}
_getch();
return 0;
}