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;
}
posted @ 2011-04-18 01:03  L..  阅读(145)  评论(0编辑  收藏  举报