ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1123. Salary

Where error?
Posted by kalisha 15 Dec 2008 19:01
#include <stdio.h>
#include <string.h>

int main(int argc, char* argv[])
{
    char string[2001];
    int i=0;
    int length;

    scanf("%s",&string);

    length=strlen(string);

        for (i=0;i<length/2;i++)
        {
            string[length-(i+1)]=string[i];
        }


    printf("%s",string);

    return 0;
}
Re: Where error?
Posted by Ivan_Petrov 21 Dec 2008 22:07
You don't take into account, that your number can be smaller.