输入输出外挂
1 //仅适合纯数字输入 2 int Scan() //输入外挂 3 { 4 int res=0,ch,flag=0; 5 if((ch=getchar())=='-') 6 flag=1; 7 else if(ch>='0'&&ch<='9') 8 res=ch-'0'; 9 while((ch=getchar())>='0'&&ch<='9') 10 res=res*10+ch-'0'; 11 return flag?-res:res; 12 } 13 void Out(int a) //输出外挂 14 { 15 if(a>9) 16 Out(a/10); 17 putchar(a%10+'0'); 18 }
posted on 2013-10-23 15:30 jumpingfrog0 阅读(1738) 评论(0) 编辑 收藏 举报