/**
 * print the temperature to stdout; format according to formatoption
 */
void Temperature::Show() const {
	/* save precision */
	streamsize ss = cout.precision();
	/* save format flags and set to sane value */
	ios_base::fmtflags ff = cout.setf(ios::dec | ios::fixed);

	/* print to stdout based on formatoption */
	switch (this->formatoption) {
		case 'p':
			cout << setprecision(1) << this->GetDegrees() << ' ' << this->GetScale();
			break;
		case 'l':
			cout << this->GetDegrees() << ' ' << this->GetLongScale();
			break;
		default: // 'd'
			cout << this->GetDegrees() << ' ' << this->GetScale();
	}

	/* restore flags and precision to saved options */
	cout.flags(ff);
	cout.precision(ss);
}