1097. Problems string (reverse output)

Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
This link: https://blog.csdn.net/qq_16525829/article/details/102773010

Title Description

There are many complex string processing operations in the computer, but these operations are complicated by the complex formed by the basic string manipulation, a character string requested to prepare a reversed procedure, the character string upside down position.

Input
input a string (<255)

Output
result reversed bit.

Sample input
COMPUTER

Sample output
RETUPMOC

#include<bits/stdc++.h>
using namespace std;
int main()
{    
    string s;    
    int a;    
    cin>>s;    
    a=s.length();    
    while(a--)    
    cout<<s[a];    
    return 0;
}

Guess you like

Origin blog.csdn.net/qq_16525829/article/details/102773010