View Code of Problem 52

#include<stdio.h>
#include<string.h>
int main(){
  char str[100],temp;
  int i,j; 
  gets(str);
  for(i=0,j=strlen(str)-1;i<strlen(str)/2;i++,j--){
    temp=str[i];
    str[i]=str[j];
    str[j]=temp;
  }
  puts(str);
  return 0;
}

Double click to view unformatted code.


Back to problem 52