int atoi(char * str)
{
int len = strlen(str);
int ans = 0;
If ('-'! =str[0])
{
for(int I = 0; I & ltlen++i)
ans+=str[i]*pow( 10,len-I- 1); ///double power (double x, double y); Calculate the y power of x
Return ans
}
other
{
for(int I = 1; I & ltlen++i)
ans+=str[i]*pow( 10,len-I- 1);
return-ans;
}
}