// 求小数点后n位#include <iostream>#define MAX_C 56000int a = 10000, b, c = MAX_C, d, e, f[MAX_C + 1], g, n, ans, cnt;using namespace std;int main() {while(~scanf("%d", &n)){for (; b - c; )f[b++] = a /
常用的截取两位 let num = 16.36172;//向下取整Math.floor(num*100)/100;//向上取整Math.ceil(num*100)/100;//四舍五入Math.round(num*100)/100;//四舍五入num.toFixed(2); toFixed(四舍五入) let num = 10.44;console.log(num.toFixed(1
http://www.cnblogs.com/AngryXiaopeng/archive/2012/07/10/2584742.html 用JS jquery取float型小数点后两位 1. 最笨的办法……. [我就怎么干的.........] function get() { var s = 22.127456 + “”; var str = s.substring