From 603df3975e60a66731226479a62bd52f43831588 Mon Sep 17 00:00:00 2001 From: msabitabrata Date: Sat, 17 Nov 2018 10:45:56 +0530 Subject: [PATCH] Proper indentation and readability (#23082) Included one of the C code snippets inside ```c``` to improve readability --- guide/english/c/math/index.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/guide/english/c/math/index.md b/guide/english/c/math/index.md index ee29d6a52b..55d3a4e96e 100644 --- a/guide/english/c/math/index.md +++ b/guide/english/c/math/index.md @@ -119,7 +119,7 @@ double angle = cos(90.00); // Givs us 0.00 int result = sqrt(16); // Gives us 4 double result = log(10.00) // Gives us 2.30 (note this is ln(10), not log base 10) ``` - +```c // C code to illustrate // the use of ceil function. #include @@ -127,21 +127,21 @@ double result = log(10.00) // Gives us 2.30 (note this is ln(10), not log base 1 int main () { -float val1, val2, val3, val4; + float val1, val2, val3, val4; -val1 = 1.6; -val2 = 1.2; -val3 = -2.8; -val4 = -2.3; + val1 = 1.6; + val2 = 1.2; + val3 = -2.8; + val4 = -2.3; -printf ("value1 = %.1lf\n", ceil(val1)); -printf ("value2 = %.1lf\n", ceil(val2)); -printf ("value3 = %.1lf\n", ceil(val3)); -printf ("value4 = %.1lf\n", ceil(val4)); + printf ("value1 = %.1lf\n", ceil(val1)); + printf ("value2 = %.1lf\n", ceil(val2)); + printf ("value3 = %.1lf\n", ceil(val3)); + printf ("value4 = %.1lf\n", ceil(val4)); -return(0); + return(0); } - +``` # Before you go on... ## A review * There are several basic operators: