Course Web Pages
Related LinksFree eBooks
|
VariablesThe videos below demonstrate the use of variables in a C++ program with examples from Dawson's Beginning C++ book. Variables Arithmetic operations. const and enum The #define preprocessor directive. String input Naming ConventionsDifferent organizations have their own conventions for variable names. See, for example, the Variable Names entry in Google's Style Guide for C++. The important thing is to use meaningful names, be consistent, and pay attention to conventions used by the wider programming community. ExerciseWrite a program that accepts a user name and three numbers, then prints out the user name and the average of the three numbers. |