C++ TutorialLesson 12Free preview
C++ Math
This lesson is part of C++ · All levels
Summary
This lesson introduces a C++ built-in mathematics library that makes numerical calculations easier. With the header, you can use functions like sqrt, pow, abs, ceil, and floor without having to calculate yourself. These functions are widely used in calculator, graphics, and data processing applications.
Key points
- The C++ mathematics library is in the header <cmath>.
- Sqrt(x) count the square root, pow(x, y) count x to the y-axis.
- Returns the absolute value of a number.
- Ceiling round up and floor round down.
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.