C语言将一串数字字符12345678变成货币形式$12,345,678
C语言将一串数字字符12345678变成货币形式$12,345,678
日期:2015-11-17 08:13:36 人气:1
办法很多,提供一个比较低级的。注意原字串空间要大到能放下修改后的字串。
//#include "stdafx.h"//If the vc++6.0, with this line.#include "stdio.h"#include "string.h"int main(void){ char a[20]="12345678",t[20],ln; for(ln=strlen(a)-3