home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C Programming Starter Kit 2.0
/
SamsPublishing-CProgrammingStarterKit-v2.0-Win31.iso
/
tyc
/
list1715.c
< prev
next >
Wrap
C/C++ Source or Header
|
1993-10-16
|
397b
|
25 lines
/* Demonstration of atof(). */
#include <stdio.h>
#include <stdlib.h>
main()
{
char buf[80];
double d;
while (1)
{
printf("\nEnter the string to convert (blank to exit): ");
gets(buf);
if ( strlen(buf) == 0 )
break;
d = atof( buf );
printf("The converted value is %f.", d);
}
}