Course C Initial 6th – Math Functions and Operators


Lesson 6.
Now we’ll see more about the math commands in C language. In some cases, they’re different.

Below, we can see a table with the math functions, firs the simple operators, after we’ll see more.

Now, I present to you other thing that can help you to solve problems. I present the math library. In C, it cans be used with this structure:
First we include it:
#include <math.h>
Note: in this case, will be used two functions that is in math library, the pow and the sqrt.
  • Pow – it’s for Exponentiation.
  • Sqrt – it’s for Square Root.
So, First show an algorithm that use the pow function:

In the display:

Now a code that calculates Square Root:

In the display:

I remember that is need you practice. Make this algorithms and practice always because this will help you to become each moment better than before. In the next lesson, we will make algorithms with all that was saw up to here.
Well, that’s all folks!
See you later!

Comentários

More Famous Posts

Course C Initial 7th – Training with Math

Course C Initial – 3rd Variables Part. 1

Course Python For Life 3 – Input Command