From 6e947647dc1252945a69b2bfe1563296c0af1d5a Mon Sep 17 00:00:00 2001 From: Thomas Papapaschos Date: Sun, 14 Oct 2018 19:08:43 +0300 Subject: [PATCH] fix(guide):add warning about dividing with zero to article. (#18445) * add warning about dividing with zero to article. text : "When dividing always check that the divisor ( in this example "b" ) is not equal to 0 ,dividing with 0 will cause your program to crash." * Update index.md --- client/src/pages/guide/english/c/math/index.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client/src/pages/guide/english/c/math/index.md b/client/src/pages/guide/english/c/math/index.md index 336258ff02..ee29d6a52b 100644 --- a/client/src/pages/guide/english/c/math/index.md +++ b/client/src/pages/guide/english/c/math/index.md @@ -33,7 +33,9 @@ Division is performed with a `/`, like so: ```C result = a / b; ``` + In the above example, the variable `result` will be equal to a divided by b. This is not always a fraction of a over b, however. When dealing with integers, things get a little different- more on that later. +When dividing always check that the divisor (in this example variable b) is not equal to 0 , dividing with 0 will cause your program to crash. # The not-so-basic stuff ## Modulo: '%'