Chapter 3 –
VARIABLES & ARITHMETICS
OPERATIONS
KNR 1743 OBJECT
ORIENTED PROGRAMMING
Chapter 3 Variables & Arithmetic Operations 1
, OBJECTIVES:
In this chapter, you will learn how to:
Work with variables
Perform arithmetic calculations
Use mathematical functions
Chapter 3 Variables & Arithmetic Operations 2
, CONTENTS
PART 1: VARIABLES
– Naming, declaring, assigning & printing values
– Creating constants qualified variables
– Assigning & printing single character data
PART 2: ARITHMETIC OPERATIONS
– Arithmetic operators & expressions
– Mixed type arithmetic, compound assignment,
operator precedence & type casting
Chapter 3 Variables & Arithmetic Operations 3
VARIABLES & ARITHMETICS
OPERATIONS
KNR 1743 OBJECT
ORIENTED PROGRAMMING
Chapter 3 Variables & Arithmetic Operations 1
, OBJECTIVES:
In this chapter, you will learn how to:
Work with variables
Perform arithmetic calculations
Use mathematical functions
Chapter 3 Variables & Arithmetic Operations 2
, CONTENTS
PART 1: VARIABLES
– Naming, declaring, assigning & printing values
– Creating constants qualified variables
– Assigning & printing single character data
PART 2: ARITHMETIC OPERATIONS
– Arithmetic operators & expressions
– Mixed type arithmetic, compound assignment,
operator precedence & type casting
Chapter 3 Variables & Arithmetic Operations 3