HUD4256 The Famous Clock

来源:互联网 发布:重庆软件外包公司 编辑:程序博客网 时间:2024/05/16 04:52
int main(){    int kase = 0;    char s[50];    while( scanf("%s",s)!=EOF ){            printf("Case %d: ",++kase);        if( !strcmp(s,"I") ) printf("1\n");        if( !strcmp(s,"II") ) printf("2\n");        if( !strcmp(s,"III") ) printf("3\n");        if( !strcmp(s,"IV") ) printf("4\n");        if( !strcmp(s,"V") ) printf("5\n");        if( !strcmp(s,"VI") ) printf("6\n");        if( !strcmp(s,"VII") ) printf("7\n");        if( !strcmp(s,"VIII") ) printf("8\n");        if( !strcmp(s,"IX") ) printf("9\n");        if( !strcmp(s,"X") ) printf("10\n");        if( !strcmp(s,"XI") ) printf("11\n");        if( !strcmp(s,"XII") ) printf("12\n");    memset(s,0,sizeof(s));    }    return 0;}

0 0
原创粉丝点击