CMPSC 101 Ch.  Resources
CMPSC 101 Home

Demo Program #1 - the declaration & use of constants

Demo Program #2 - the use of an assignment statement

Demo Program #3 - to illustrate the dangers of not initializing variables

Demo Program #4 - the use of declaration & assignment statements

Demo Program #5 - to illustrate type coercion & type casting

Demo Program #6 - a rounding algorithm that uses type casting

Demo Program #7 - how to show trailing zeros in an outputted number

Demo Program #8 - formatting long cout statements