CMPSC 101 Ch.  Resources
CMPSC 101 Home

Demo Program #1 - the use of void functions (functions that do not return a value). One void function has a parameter and the other does not.

Demo Program #2 - the use of a function that does return a value but that does not have any parameters.

Demo Program #3 - the use of functions and a global variable (which is dangerous and usually inappropriate.)

Demo Program #4 - passing a char argument to a function that returns a char

Demo Program #5 - using two functions include one that generates random numbers

Demo Program #6 - the use of a rounding function