新手请教
请问加什么语句才能让输出的只控制在小数点两位?比如105.88.先谢过。#include <iostream>
#include <stdio.h>
#include <iomanip>
void main(void)
{
float value = 36;
float t1,t2,t3,t4;
t1=value/0.34;
t2=value/0.43;
t3=value/0.52;
t4=value/0.61;
cout << "1: " << t1 << endl;
cout << "2: " << t2 << endl;
cout << "3: " << t3 << endl;
cout << "4: " << t4 << endl;
}