C++把string转换成double,求整数a/b精确到小数点后任意位
摘要://cppTest.cpp:定义控制台应用程序的入口点。//#include"stdafx.h"#include<cassert>#include<iomanip>//求a/b,输出结果小数点后的前n位voidDiv(inta,intb,intn){usingnamespacestd;assert(n>=0);if(a<b)cout<<"0.";el...
阅读全文
posted @ 2007-10-03 20:56
浙公网安备 33010602011771号