首页 > 代码库 > read

read

技术分享
 1 int read() 2 { 3     int t=0,f=1; 4     char ch=getchar(); 5     while(ch<0 || ch>9) 6     { 7         if(ch==-) {f=-1;ch=getchar();} 8     } 9     while(ch>=0 && ch<=9) {t=t*10+ch-0;ch=getchar();}10     return t*f;11 }
read

 

read