Sie sind auf Seite 1von 13

By

Kevin O Neill
Copyright 2005

1
For the parents:

The purpose of this book is to present C++


terms in a fun dynamic way so that toddlers
can start to gain an understanding of
these concepts at an early age.

The last Toddlers Page is a Full C++ Program

The Parents Pages (which Are the last


two pages of the book) list Definitions
so that Parents can help teach their
Toddlers the actual meaning of the
Symbol s presented in this Book.

2
3
4
5
6
7
8
9
10
11
Parents Page:
C++ - an object oriented programming language
Cout - Used to Print to the screen
Cin - used to obtain input
\ n - newline, positions to the next line
\ t - tab, positions information over
\ r - carriage return, positions to current line
\ a - alert, sounds a bell
\ " - double quote, prints double quote character
\ \ - backslash, prints backslash character
int integer number (example 6) (range is -32,768 to 32,767)
= - equals
== - is equal to
!= - not equal
> - greater then
< - less then
>= - greater then or equal to
<= - less than or equal to
if - if expression
else - else expression
else if else if expression
* - multiplication
/ - divide
% - percent
() - parentheses
for - for loop
while - while loop
do while - do while loop
break - used to end execution of a loop at any point
continue jumps over remainder of the loop body
char - character (example A)
float - floating point number (example 3.14)
const c o n s t a n t (c a n t b e mo d if ied )
short short number (same range as an int)

12
Code Description Page (Describes code on page 11 line by line)
<#include iostream.h> - system header file allows output (cout) and input (cin)
Functionality to be utilized
//Program single line comment does not appear on screen, only viewed by the coder
main() start of the program, every program must have a main function
{ - start bracket or in this case, the start of the program code
c o u t << P r o g r a m ; - prints the words Program on to the screen
return 0; - used to let program know that it has ended successfully
} end bracket or in this case, the end of the program code

13

Das könnte Ihnen auch gefallen