// forstr1.cpp -- using for with a string
#include <iostream>
#include <cstring>
using namespace std;
const int ArSize = 20;
int main()
{
    cout << "Enter a word: ";
    char word[ArSize];
    cin >> word;

    // display letters in reverse order
    for (int i = strlen(word) - 1; i >= 0; i--)
        cout << word[i];
    cout << "\n";
    return 0;
}

