Lecture Summaries - Week 2
Jump To:
[Lecture Index |
Previous Week's Lectures |
Next Week's Lectures]
Topics covered:
- How to get output to line up neatly.
- A revised version of the price-computing program
(price2.c, page 11).
- The tab character (\t).
- Controlling how we write numbers (floating points and integers).
- Defining constants with #define.
- Why program layout matters.
- A hard-to-understand program.
(messy.c, page 15).
- Why we need loops.
- Implementing loops with the while statement.
- What counting loops are.
- A program to count from 1 to 10
(count.c)
- How to combine counting loops with calculations.
- A program to print bank balances
(intrate.c, page 20).
Reading: Chapter 1.5 (pages 13-17), Chapter 2.1 (pages 19-22).
Topics covered:
- How to write programs.
- Stepwise development of a program to produce a table of salaries:
- The output we want
(sal.out).
- Producing just the basic headings
(sal1.c).
- Producing the "Hours" column
(sal2.c).
- Producing the "Salary" column
(sal3.c).
- Producing the "Taxes" column
(sal4.c).
- Producing the final output
(sal.c).
- Stepwise development of a program to produce a table of
cumulative sums.
- The output we want
(sum.out).
- Printing only the values
(sum1.c).
- Printing the values plus the sum
(sum2.c).
Reading: (no new reading for this lecture).
[EE150 Home Page |
Top Of Page]