#include<stdio.h>
int ascii_to_integer(char *string);
int main(){
char number[]="1320434";
printf("%d\n",ascii_to_integer(number));
return 0;}
//
int ascii_to_integer(char *string){
int sum=0;
while(*string){
if(*string<'0'||*string>'9')
return 0;
sum=sum*10+*string++-'0';
}
return sum;}
02-07
410
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)