在C语言中我们可以这样写;
printf("%.2f", number);
我怎么能用C++做到这一点?
std::cout << "The number is " << number;
c c++ floating-point double
c ×1
c++ ×1
double ×1
floating-point ×1