Input a string, reverse the string, and output the reversed string.
Input format:
Input a non-empty string that does not exceed 80 characters in length and ends with a carriage return in one line.
Output format:
output the reversed string in one line.
Input sample:
Hello World!
Output sample:
!dlroW olleH
title collection complete works portal
#include <stdio.h>
#include <string.h>
int main()
{
char a[81];
gets(a);
for (int i = strlen(a) - 1; i >= 0; i--)
printf("%c", a[i]);
return 0;
}