BuiltWithNOF
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

    Savitch:
    Section 2.4, Pages 73-82 (if/else) [7th, 6th 74 - 83]
    Section 3.1 - 3.2, Pages 110-137 (Boolean Expressions, Multiway Branches) [7th 112-139] [6th 110-137]

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

Take-Home Programming Assignment

Reading Assignment

    Internet:
    WWW.GRAPHICSMAGICIAN.COM

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