代码:
1 int Scan() //输入外挂 2 { 3 int res=0,ch,flag=0; 4 if((ch=getchar())=='-') 5 flag=1; 6 else if(ch>='0'&&ch<='9') 7 res=ch-'0'; 8 while((ch=getchar())>='0'&&ch<='9') 9 res=res*10+ch-'0'; 10 return flag?-res:res; 11 } 12 void Out(int a) //输出外挂 13 { 14 if(a>9) 15 Out(a/10); 16 putchar(a%10+'0'); 17 }