LeeBlog

导航

hdu 1161 Eddy's mistakes

#include<stdio.h>
#include<string.h>
int main( )
{
    char str[1024] = {0};
    while( (  gets( str ) )  )
    {
           int i = 0;
           while( str[i] )
           {
                  if( str[i] >= 'A' && str[i] <= 'Z'  )
                      str[i] += 32;
                      ++i;
                      }
           printf( "%s\n",str );
           memset( str,0,sizeof( str ) );
           }
    return 0;
}

posted on 2011-03-13 09:46  LeeBlog  阅读(225)  评论(0编辑  收藏  举报