// Program format demonstrates the use of fieldwidth specifications.

// Begin with preprocessor directives and using statements

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

// Global constant identifiers

const int INT_NUMBER = 1066;       // arbitrary number
const float FLT_NUMBER = 3.14159;  // rough approximation of pi

// Define the global function main()

int main()
{
	cout.setf(ios::fixed, ios::floatfield);
	cout.setf(ios::showpoint);

	float floatValue;
	float floatValue2;
	int   intValue;
	
	intValue = INT_NUMBER + FLT_NUMBER;
	floatValue = static_cast<float>(INT_NUMBER) + FLT_NUMBER;
	floatValue2 = float(INT_NUMBER) + FLT_NUMBER;
	
	cout << INT_NUMBER << endl;
	cout << intValue << endl;
	cout << setw(10) << intValue << endl;
	cout << setw(10) << intValue << intValue/10 << endl;
	cout << setw(10) << floatValue << endl;
	cout << setw(10) << floatValue2 << endl;
	cout << setprecision(10) << floatValue2 << endl;
	cout << setw(10) << setprecision(3) << floatValue2 << endl;
	cout << floatValue2 << endl;
	cout << intValue << setw(3) << intValue << setw(7) << intValue << endl;
	
	return 0;
}

