C++ - Programming Language
This course covers the basics of programming in C++. Work your way through the videos/articles and I'll teach you everything you need to know to start your programming journey!

Math

Lesson 9
Author : 🦒
Last Updated : November, 2017


Video Code

Copycout << 2 * 3 << endl;         // Basic Arithmetic: +, -, /, *
cout << 10 % 3 << endl;        // Modulus Op. : returns remainder of 10/3
cout << 1 + 2 * 3 << endl;     // order of operations
cout << 10 / 3.0 << endl;      // int's and doubles


int num = 10;
num += 100; // +=, -=, /=, *=
cout << num << endl;

num++;
cout << num << endl;

// #include <cmath>
cout << pow(2, 3) << endl;
cout << sqrt(144) << endl;
cout << round(2.7) << endl;