Creating Love Calculators in different ways to trick my friends was one of my hobbies. Here i’ll explain one method of doing it using C++. I’ll explain the basic logic and you’ll do the decorations and modifications.Continue reading

# Category: C++

## For Loop made easy!

Here is a video for you to explain For-Loop in C++ thoroughly.

## Matrix Multiplication in C++

In previous post, i’ve explained how to write a program to perform matrix addition. Now we’ll look how to perform matrix multiplication in C++. Before continuing, this picture will explain you how multiply 2 matrices manually.Continue reading

## Matrix Addition in C++

Matrix is nothing but a set of numbers arranged in rows and columns. Adding 2 matrices is even simpler. Just add the corresponding entries of 2 matrices to get the corresponding element of result matrix. The

*2 matrices should be of the same order*, i.e., should have the same number of rows and columns. Here is the pictorial representation of 2*2 matrix added with another 2*2 matrix.## Tail Call, Tail Recursion and Tail Call Optimization

**Tail Call**

Tail Call happens when a function returns a value which is the immediate return value of another function. For instance, here is a tail call:

## Comparing Recursion and Iteration in terms of expressibility, readability, writability, maintainability, performance and memory

In previous posts, I’ve explained how to write C++ program to find factorial with recursion and with iteration. Also there are 2 other posts to generate Fibonacci series with recursion and with iteration. Now we’ll compare Recursion and iteration. Theoretically, everything that can be implemented using iteration can be converted to corresponding recursive implementation. Here we will compare which implementation is better in terms of expressibility, readability, writability, maintainability, performance and memory.Continue reading

## Print Fibonacci Series using Recursion in C++

In a previous post, i explained how to write a program to print fibonacci series using iteration. In this post, i’ll help you implement the same using recursion. Continue reading

## Factorial using Recursion in C++

In the previous post, i explained how to write a program to find factorial of a number. Now i’ll explain how to do the same task using a different way, i.e, using recursion.Continue reading

## Find factorial of a number in C++

This is a simple program to find the factorial of a number. Factorial of a number is the product of numbers from 1 to that number. For instance, factorial of 4 is

*4 * 3 * 2 * 1 = 24*.Continue reading## Print Fibonacci Series in C++

This post will help you to write a program to print Fibonacci series in C++. The first 2 numbers in a Fibonacci series are 0 and 1. Each other term is the sum of previous 2 numbers. i.e the series goes on like: 0 1 1 2 3 5 8 13 and so on..Continue reading