POJ 3650 The Seven Percent Solution

  
    
#include < stdio.h >

int main( )
{
char input;
while ( (input = getchar()) != ' # ' ) {
switch (input) {
case ' ' : printf( " %s " , " %20 " ); break ;
case ' ! ' : printf( " %s " , " %21 " ); break ;
case ' $ ' : printf( " %s " , " %24 " ); break ;
case ' % ' : printf( " %s " , " %25 " ); break ;
case ' ( ' : printf( " %s " , " %28 " ); break ;
case ' ) ' : printf( " %s " , " %29 " ); break ;
case ' * ' : printf( " %s " , " %2a " ); break ;
default : printf( " %c " , input); break ;
}

}
return 0 ;
}

你可能感兴趣的:(poj)