09/01/04 03:26:16
>>171
後付で条件足すなよ!
#include<iostream>
#include<iterator>
#include<string>
#include<cstdlib>
#include<cctype>
int main(){
std::string src;
copy(std::istreambuf_iterator<char>(std::cin),std::istreambuf_iterator<char>(),back_inserter(src));
for(const char*s=src.c_str();;){
if(*s=='\0')break;
if(std::isspace(*s))++s;
char*next=const_cast<char*>(s);
std::strtod(s,&next);
if(s == next){++s;continue;}
std::cout.write(s,next-s);
std::cout << std::endl;
s = next;
}
}