Set the uppercase flag for double value
#include <iostream> using namespace std; int main() { int x = 100; double f = 98.6; double f2 = 123456.0; double f3 = 1234567.0; // Set the uppercase flag. cout << "Setting uppercase flag.\n"; cout.setf(ios::uppercase); cout << "f3 with uppercase flag set: " << f3 << endl; return 0; }