琐碎知识

摘要: 好多细节知识已经忘了,需要写出来汇总一下了:1.输出两位小数#include<iostream> #include<iomanip> //setprecision() using namespace std; int main() { float a=1.66666; printf("%.2f\n", a); cout<<setprecision(3)<<a<<endl; system("pause"); return 0; }2.四舍五入法#include<iostream> #i 阅读全文
posted @ 2012-04-18 22:00 java课程设计例子 阅读(171) 评论(0) 推荐(0)