Lecture 1 Objectives
At the end of today's class you should
KNOW:
- Where to find course information for CS 2005
- C++'s selection structures (if, else if, switch)
- C++'s looping structures (for, while, do)
- C++'s data types (int, float, double, char, bool)
- How to define an array
BE ABLE TO:
- Write C++ code to process a one-dimensional array
Sample Exam Question:
Write C++ code that will initialize an array of 25 int's such that the
value stored in each array element is the same as that element's index
(array element [0] contains a 0, array element [1] contains a 1, etc.)
Write your code using
- a for-loop
- a while-loop
- a do-loop