📄 atof.c
字号:
/* Demonstration of atof(). */
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
int main( void )
{
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);
}
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -