View Code of Problem 52

#include <stdio.h>
#include <string.h>

int main(){

    char ch[100];
    gets(ch);
    int len = strlen(ch);
    int left = 0, right = len -1;
    for(; left<right; left++,right--){
        int temp = ch[left];
        ch[left] = ch[right];
        ch[right] = temp;
    }
        puts(ch);
    return 0;
}

Double click to view unformatted code.


Back to problem 52