fork download
#include <iostream>
#include <iomanip>
using namespace std;

int main() {
    double number = 12;

    // Set precision to 2 decimal places using std namespace
    cout << fixed <<setprecision(2) << number << endl;
    //fixed setprecision(2)

    return 0;
}
Success #stdin #stdout 0s 5292KB
stdin
Standard input is empty
stdout
12.00