//LabioFormat.cpp 
//This program is for a lab in cps171 to investigate formatting of output
//  and input.  J. Remen Sept 96 Updated Fall 02

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

int main()
{                       // declare some variables
	  int num;
	  char ch;
	  float cost, tax;
								// print column numbers for reference
	  cout << "123456789012345678901234567890" << endl;
								// set up for formatting output
	  cout << fixed << showpoint;
								// put some values in the variables
	  num = 123;
	  ch = 'A';
	  cost = 45.2519;
	  tax = .06;
								// try different formats for output
	  cout << "num=" << setfill('*') << setw(5) << num << endl;
	  cout << "ch=" << setw(2) << ch << endl;
	  cout << "cost=" << setprecision(3) << setw(6) << cost << endl;
	  cout << "tax=" << setw(4) << tax << endl;
	  cout << "*******************************" << endl << endl;

// the following is for the second part of the lab - note commented out!
/*
	  cout << setfill(' ');
	  						// experiment with input data
	  cout << "Enter an integer, character, and 2 floats" << endl;
	  cin >> num >> ch >> cost >> tax;
								// output the new values
	  cout << "num="  << num << endl;
	  cout << "ch="   << ch << endl;
	  cout << "cost=" << cost << endl;
	  cout << "tax="  << tax << endl;
	  cout << "*******************************" << endl;
*/
	  return 0;

}

