版权声明:转载请注明来源~ https://blog.csdn.net/Lth_1571138383/article/details/83188951
Github地址:φ(>ω<*) 这里这里。
#include<stdio.h>
#include<string.h>
int main(void)
{
int i = 0; // Create for loop.
int j = 0; // Save the last subscript value.
char n = '\n';
char word[50] = {};
printf("Please input one word:");
scanf("%s", word);
j = strlen(word);
putchar(n);
printf("Turn the word upside down like this :");
for( i = 0; j >= i ; j-- )
{
printf("%c", word[j]);
}
putchar(n);
getchar();
getchar();
return 0;
}