我有一个非常具体的问题。我可以在C ++中从算术1.523中算术得到1.5,但不使用iomanip库吗?谢谢。
例如,您可以直接在cout上使用precision()
precision()
std::cout.precision(2);