全文预览

浙江大学C程题库(更新)

上传者:蓝天 |  格式:pdf  |  页数:181 |  大小:9146KB

文档介绍
ch!=&&k<MAXLEN-1){str[k++]=ch;ch=getchar();\r)\roldch=#';\rstr[k]=\0,;\rfor(i=0;i<k;i++)\r{if(str[i]>=A'&&str[i]<='Z')\rstr[i]=155-str[i];}\rputs(str);EvaluationWarning:ThedocumentwascreatedwithSpire.PDFfor.NET.\r60025\r#include}stdio.h}\rftdefineMAXLEN80\rintmain()\r{inti,k,p;\rlongnumber;\rcharch,oldch,str[MAXLEN],num[MAXLEN];\roldch=\0J;\rwhile((ch=getchar())!=,||oldch!=){k=0,number=0,p=l;\rwhile(ch!=&&k<MAXLEN-1){str[k++]=ch;\rch=getchar();\r)\roldch=#';\rstr[k]'\0';\rfor(i=k-l;i>=0;i-)\r(\rif(str[i]>=,0?&&str[i]<=,9f)\rnumber=number+(str[i]-48)*p,p=p*16;elseif(str[i]>=A,&&str[i]<=F')\rnumber=number+(str[i]-55)*p,p=p*16;elseif(str[i]>=a'&&str[i]<=f')\rnumber=number+(str[i]-87)*p,p=p*l6;}\rprintf( ?d\n 0number);EvaluationWarning:ThedocumentwascreatedwithSpire.PDFfor.NET.\r})

收藏

分享

举报
下载此文档