Skip to content

Commit fbad3bf

Browse files
author
Svetlin Nakov
committed
Updates Content/Chapter-2-1-simple-calculations/arithmetical-operations/arithmetical-operations.md
Auto commit by GitBook Editor
1 parent 7cf3bbe commit fbad3bf

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

Content/Chapter-2-1-simple-calculations/arithmetical-operations/arithmetical-operations.md

+5-8
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Let's examine the basic **arithmetic operations** in programming. We can add, su
66

77
Watch a video lesson about the arithmetic operators: [https://youtu.be/XOtEuEUbA4M](https://youtu.be/XOtEuEUbA4M).
88

9-
## Summing up Numbers \(Operator +\)
9+
## Summing up Numbers: Operator +
1010

1111
We can **sum** up numbers using the `+` operator:
1212

@@ -16,7 +16,7 @@ var b = 7;
1616
var sum = a + b; // the result is 12
1717
```
1818

19-
### Subtracting Numbers \(Operator -\)
19+
## Subtracting Numbers: Operator -
2020

2121
**Subtracting** numbers is done using the `-` operator:
2222

@@ -31,7 +31,7 @@ Here is the result of the execution of this program \(with numbers 10 and 3\):
3131

3232
![](/assets/chapter-2-images/00.Subtracting-01.jpg)
3333

34-
## Multiplying Numbers \(Operator \*\)
34+
## Multiplying Numbers: Operator \*
3535

3636
For **multiplication** of numbers we use the `*` operator:
3737

@@ -41,7 +41,7 @@ var b = 7;
4141
var product = a * b; // 35
4242
```
4343

44-
## Dividing Numbers \(Operator /\)
44+
## Dividing Numbers: Operator /
4545

4646
**Dividing** numbers is done using the `/` operator. It works differently with **integers** and **floating point numbers**.
4747

@@ -72,7 +72,7 @@ Console.WriteLine(a / 4); // Integer result: 6
7272
Console.WriteLine(a / 0); // Error: divide by 0
7373
```
7474

75-
### Dividing Floating Numbers
75+
### Dividing Floating-Point Numbers
7676

7777
Let's look at a few examples for **floating division**. When we divide floating point numbers, the result is always a **float number** and the division never fails, and works correctly with the special values **+∞** and **-∞**:
7878

@@ -93,6 +93,3 @@ When printing the values **∞** and **-∞**, the console output may be `?`, b
9393
-?
9494
NaN
9595
```
96-
97-
98-

0 commit comments

Comments
 (0)