//
int atoi( const char* s );
01 头文件
#include<cstdlib> // std not str !!!
02 返回值
return 字符串 起始部分 最长的 int 值, 若起始部分就为非数字 return 0
// eg.
#include<bits/stdc++.h>
using namespace std;
const int N=111;
char str[N];
int main()
{
while( ~scanf("%s",str) )
{
printf("%d\n",atoi(str) );
}
return 0;
}
// 可能的输出:
// 123.456
// 123
// 123www
// 123
// 0.1
// 0
// www111 // 注意 开头就不是数字的话 return 0
// 0