How to use uppercase and scientific cout format flags in C++

1 Answer

0 votes
#include <iostream>

using std::cout;
using std::endl;
using std::ios;

int main()
{
	cout.setf(ios::uppercase | ios::scientific);

	cout << 672.0 << endl;

	return 0;
}

/*
run:

6.720000E+02

*/

 



answered Apr 9, 2018 by avibootz

Related questions

...