Professional Documents
Culture Documents
Chapter 02
Chapter 02
Introduction to
C++
Programming is
fun!
Programming is
fun!
int item;
Variable Definition
20 is an integer literal
itemsOrdered
totalSales Yes
total_Sales Yes
itemsOrdered = 15;
Integer Literals
'A'
H e l l o \0
item = 12;
// ERROR!
12 = item;
- subtraction ans = 7 - 3; 4
* multiplication ans = 7 * 3; 21
/ division ans = 7 / 3; 2
% modulus ans = 7 % 3; 1