Hello C++:
Variables
At the end of this lesson
you will know what a variable is and how to use them in a program.
You will be able to write a program that will input values, perform a simple
calculation and output the result.
1. Print and read the lesson. (Punch, staple, put in your binder.)
Variables
2. Do the online tutorial: basic:
3. Run each of the programs from the lesson:
hello1, hello2, inches1, inches2, purchase, feet
to inches,
average, hypotenuse, rounded
average
To get the most out of these programs
- Copy the program, paste it into your C++ compiler and run it.
- Experiment with it: make little changes and see what happens, make sure
you understand it.
- Erase it - now try to write it without looking at your notes!
4. Using the sample programs as a model, write a program to do some other
calculation. Follow good programming habits:
- Indent each statement inside the curly braces about 2 spaces. All of the
statements should line up.
- Use good variable names and comments: if you look at the program in a year,
will you know what the program does?
All of the computer_science activities with description in Arabic, 汉语, English, Français, Deutsch, Indonesian, Italiano, 日本語, Portuguêes, Русский, Español,