Place
your mouse in the areas below to see comments about the corresponding sections
of code
Code
/* Formatting and <iomanip.h> file: 4ex1.cpp(or used as 4ex1.appended) FALL 1998 ___________________________________ Jacob Y. Kazakia jyk0 September 28, 1998 Programming example 1 of week 4 Recitation Instructor: J.Y.Kazakia Recitation Section 01 ___________________________________
Purpose: This program reads three numbers a, b, and c
through the keyboard and outputs them on the screen in various
FIXED formats.
Algorithm: Uses the functions: setiosflags, setw, setprecision
to format output
ios:: fixed ios:: scientific ios:: showpoint
*/ #include <iostream.h> #include <iomanip.h>
void main() { // variables are typed and defined
float a,b,c; // the three numbers
cout<<" \n\n Please enter 3 numbers \n a = "; cin>>a; cout<<"\n b = "; cin>>b; cout<<"\n c = "; cin>>c;