LbyG's recent timeline updates
LbyG

LbyG

V2EX member #70294, joined on 2014-08-08 16:47:29 +08:00
LbyG's recent replies
[email protected]排队。。。。
Sep 23, 2014
Replied to a topic by lisonfan 问与答 刚学 C 遇到一个问题,double 的...
#include <iostream>
using namespace std;

int main()
{
double a=1.567;
a=int(a*100)/100.0;
printf("%.2lf",a);
return 0;
}
这样就可以输出1.56了,不知道楼主是不是这个意思
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5391 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 19ms · UTC 07:59 · PVG 15:59 · LAX 00:59 · JFK 03:59
♥ Do have faith in what you're doing.