/*实现将输入的字符串反序输出*/
#include <stdio.h>
#include <string.h>
main()
{
char str[200],temp;
int i,j,k;
printf(" Enter a string: ");
scanf("%s",str);
k=strlen(c);
for( i = 0, j = k-1; i < k/2; i++.j--)
{
temp=str[j]; str[j]=str[i];str[i]=temp;
}
printf("%s\n",str);
return 0;
}
每日一编C-2
最新推荐文章于 2024-03-05 00:24:35 发布