在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
Abstract Introduction double_to_string.c / C
1 /*
2 (C) OOMusou 2008 http://oomusou.cnblogs.com 3 4 Filename : double_to_string.c 5 Compiler : Visual C++ 9.0 / Visual Studio 2008 6 Description : Demo how to convert string to int (double) 7 Release : 10/27/2008 1.0 8 */ 9 10 #include <stdio.h> 11 12 int main() { 13 int i; 14 double d; 15 char s[256]; 16 17 i = 10; 18 sprintf(s, "%d", i); 19 printf("%s\n", s); 20 21 d = 1.23; 22 sprintf(s, "%f", d); 23 printf("%s\n", s); 24 } |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论