Lesson 3: Working with Libraries, and calculating interest

[spoiler title=”Lesson Video”]
Direct Download of Video (For mobile / offline viewing)(right click > save target as)


[/spoiler]

[spoiler title=”Lesson Source Code”]

[/spoiler]

Homework is described and should be submitted here: https://beginnerscpp.com/forums/index.php/topic,55.0.html



Cmath
Cmath is a library that is used to perform mathematical functions in C++ programs. You could always create functions of your own to perform the tasks in this library (when you learn functions down the line). For a more complete listing of functions available inside the cmath library click here


Raising a number to a power
Raising a number to a power is very easy in C++ using the Cmath library. The reference linked above should show you examples. For powers you would use pow(number, powerRaisedTo); as your command.