C# Programming: Lesson 3. Arithmetic Operations



C# Programming: Lesson 3. Arithmetic Operations

C# Programming: Lesson 3.  Arithmetic Operations

This is the third in a series of computer science lessons about programming with C# for beginners. In this lesson you will learn how to use arithmetic operators to perform calculations. Specifically, you will meet the operators you need to add, multiply subtract and divide numbers. You will learn that the division operator always ignores the remainder when dividing integers, unless you take steps to ensure that integer values are cast as real numbers first. You will also learn about the modulus operator, and how to raise one number to the power of another by means of the Pow method of the Math class. C#’s special syntax for incrementing and decrementing values is also covered. In addition, you will learn how Visual Studio’s Artificial Intelligence based IntelliCode feature can be used to speed up your coding.

Chapters:
00:00 Introduction
00:30 Arithmetic operators (add, subtract, multiply)
03:27 Integer and real number division
06:33 Modulus
07:50 Increment or decrement a value
09:37 Exponentiation with Math.Pow
11:03 Exercise
11:58 Solution and Visual Studio IntelliCode