/*
long double strtold ( const char * restrict s , char ** restrict endptr ); (C99)
*/
#include
#include
#include
int main(void)
{
char in[1024], *start = in, *next = in;
long val;
puts( "Taper un nombre à virgule:" );
scanf( "%[^n]", in );
puts( "Vous avez entré:" );
while ( 1 )
{
val = strtold( start, &next );
if ( next == start )
break ;
printf( "t%gn", val );
start = next;
}
puts( "Done." );
return 0;
}