Cplusplus.
#include <iostream> #include <iomanip> int main() { double pi = 3.141592653589793; std::cout << std::fixed << std::setprecision(2); // Sets the precision to 2 decimal places std::cout << "Pi is approximately " << pi << std::endl; // Outputs "Pi is approximately 3.14" return 0; } Conclusion Basic