#include <stdio.h>
#include <string.h>
int main(){
int i;
char msg[25];
printf("Type up to 25 characters and then press Enter.../n");
for (i = 0; i < 25; i++)
{
msg[i] = getchar(); //read a single character
if (msg[i] == '/n')
{
i--;
break;
}
}
putchar('/n'); // One line break after the loop is done.
for (; i >= 0; i--)
{
putchar(msg[i]);
}
putchar('/n');
return(0);
}
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/266626.html