## Bisymmetric matrix in C++? Arnab Chakraborty

Updated on 30-Jul-2019 22:30:26

48 Views

Here we will see one program that will help to check whether a matrix is bisymmetric or not. The Bisymmetric matrix is one square matrix that are symmetric about both of the major diagonals. The below matrix is an example of bisymmetric matrix.1 2 3 4 5 2 6 7 ... Read More

## C/C++ Program for Median of two sorted arrays of same size? Arnab Chakraborty

Updated on 30-Jul-2019 22:30:26

215 Views

Here we will see how to get the median of two sorted array of the same size. We will use C++ STL to store array elements. After getting two arrays, we will merge them into one. As two arrays of same size are merged, then the final array will always ... Read More

## C Program for compound interest? Arnab Chakraborty

Updated on 30-Jul-2019 22:30:26

610 Views

Here we will see how to get the compound interest by writing one C program. The logic is very easy. Here we need some parameters −P − Principle amountR − Rate of interestT − Time spanThe compound interest formula is like belowExample#include #include float compoundInterest(float P, float T, float R) ... Read More

## C Program for cube sum of first n natural numbers? Arnab Chakraborty

Updated on 30-Jul-2019 22:30:26

1K+ Views

In this problem we will see how we can get the sum of cubes of first n natural numbers. Here we are using one for loop, that runs from 1 to n. In each step we are calculating cube of the term and then add it to the sum. This ... Read More

## C Program for Difference between sums of odd and even digits? Arnab Chakraborty

Updated on 30-Jul-2019 22:30:26

349 Views

Suppose we have one long integer. We have to find if the differences between the sum of the odd position digits, and the sum of the even position digits are 0 or not. The positions are start from 0 (left most).For example, suppose a number is 156486. The odd position ... Read More

## C Program for efficiently print all prime factors of a given number? Arnab Chakraborty

Updated on 30-Jul-2019 22:30:26

349 Views

In this section, we will see how we can get all the prime factors of a number in an efficient way. There is a number say n = 1092, we have to get all prime factors of this. The prime factors of 1092 are 2, 2, 3, 7, 13. To ... Read More

## C Program for Extended Euclidean algorithms? Arnab Chakraborty

Updated on 30-Jul-2019 22:30:26

492 Views

Here we will see the extended Euclidean algorithm implemented using C. The extended Euclidean algorithm is also used to get the GCD. This finds integer coefficients of x and y like below −𝑎𝑥+𝑏𝑦 = gcd(𝑎, 𝑏)Here in this algorithm it updates the value of gcd(a, b) using the recursive call ... Read More

## C Program for Find largest prime factor of a number? Arnab Chakraborty

Updated on 30-Jul-2019 22:30:26

2K+ Views

In this section, we will see how we can get the largest prime factor of a number in an efficient way. There is a number say n = 1092, we have to get the largest prime factor of this. The prime factors of 1092 are 2, 2, 3, 7, 13. ... Read More

## C Program for Find sum of odd factors of a number? Arnab Chakraborty

Updated on 30-Jul-2019 22:30:26

707 Views

In this section, we will see how we can get the sum of all odd prime factors of a number in an efficient way. There is a number say n = 1092, we have to get all factor of this. The prime factors of 1092 are 2, 2, 3, 7, ... Read More