Week 4

This week, we are learning conditional (if/else) statements from Chapter 4 of the textbook. The topics are from Sections  4.2, 4.3, 4.4 and 4.7 of Tapestry. Then we also covered function prototypes from Section 2.6 of the textbook.
Example codes for the if statements are not in the book, you can find them below.

We also learned about function prototypes as well as functions that return a value and the math library for many math functions.

Powerpoint files

if

funcs2

C++ codes discussed in class (some of them might have been modified in class to show extra features)

with_if_else_cpp

with_if_cpp

if_after_if_cpp

if_after_else_cpp

if_after_else_2_cpp

order_cpp

order2_cpp

area_func_return_cpp

usemath_cpp

weekday_cpp

isleap_cpp

isleap2_cpp

pizza2_cpp