Modulus and Short-Hand Operators




This video tutorial explains the modulus operator and the shorthand operators for addition, subtraction, division, multiplication and modulus operation in c++.
You will learn how to use them in detail with example.

source code for this tutorial

#include <iostream>

using namespace std;

int main()
{
    int num1 = 20, num2 = 3;

    num1 %= num2;
    cout << num1;
    return 0;
}