parent
5ea5a80c76
commit
c56459a224
@ -0,0 +1,23 @@
|
||||
#include<stdio.h>
|
||||
#include<string.h>
|
||||
#define N 100
|
||||
int main()
|
||||
{
|
||||
char tmp=0;
|
||||
char array[N];
|
||||
int i=0,j=0;
|
||||
printf("inpute a integer:\b");
|
||||
gets(array);
|
||||
for(i,j=strlen(array)-1;i<j;--j,++i)
|
||||
{
|
||||
tmp=array[i];
|
||||
array[i]=array[j];
|
||||
array[j]=tmp;
|
||||
}
|
||||
j=0;
|
||||
while(array[j] !='\0')
|
||||
{printf("%c",array[j]);
|
||||
++j;
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
Loading…
Reference in new issue