You can OR together two or more flags: ios::uppercase | ios::scientific
#include <iostream> using namespace std; int main() { cout.setf(ios::uppercase | ios::scientific); cout << 1001.12; cout.unsetf(ios::uppercase); // clear uppercase cout << " \n" << 1100.12; return 0; }