BuiltWithNOF
CIS-123 Week 4

Input/Output & Formatting

Topics

  • Read data from the console input (cin).
  • Write data to the console output (cout).
  • Format outputted data using member functions:
         width()
         precision()
         setf() (ios::fixed, ios::scientific, ios::showpoint, ios::right, ios::left)
         unsetf()
  • Format outputted data using manipulators:
         setw()
         setprecision()
         setioflages() (ios::fixed, ios::scientific, ios::showpoint, ios::right, ios::left)
         resetioflags()

At the end of the week you should be able to:

  • Read in a value from the console and place it in a variable.
  • Display the contents of a variable to the console.
  • Display a floating point number to a specified precision
  • Display a value in a field of a specific width
  • Display a floating point number in fixed or scientific notation

Reading Assignment

    Hanly:
    Chapter 3, Pages 71-104 (Control Structures)

    Pirsig:
    Pages 127 - 128 (All done by one person) [Harper 179-180]

Reading Assignment

    Internet:
    WWW.GRAPHICSMAGICIAN.COM

[Home] [About Me] [Office Hours] [CIS 098] [CIS 110] [CIS 114] [CIS 121] [CIS 123] [CIS-123 Books] [CIS-123 Week 1] [CIS-123 Week 2] [CIS-123 Week 3] [CIS-123 Week 4] [CIS-123 Week 5] [CIS-123 Week 6] [CIS-123 Week 7] [CIS-123 Week 8] [CIS-123 Week 9] [CIS-123 Week 10] [CIS-123 Week 11] [CIS-123 Week 12] [CIS-123 Week  13] [CIS-123 Week 14] [CIS-123 Week 15] [CIS-123 Week 16] [CIS123 Online Video] [CIS-123 Rocket Launch] [CIS 127] [CIS 170] [CIS 207] [CIS 226] [CIS 227] [CIS 230] [CIS 262] [COL 101]