# Category Archives: Program

## Write a Program in C++ & Python to transpose a Matrix

Here in this program, we will code to transpose a matrix. By transposing a matrix means we will change its row with its columns.

## WAP in C++ & Python for the Union of Two Arrays

Here in this program, we will code to combine two Array in a sorted manner. In this program, we will ask the user to enter elements for two arrays in ascending order and combine both arrays elements and store them in a new array. The new array which would be a union of user two… Read More »

## Write a program in C++ using the switch case to print the Equivalent name of the day on the basis of user input

In this program, we will code to print out the week’s day on the basis of user input from 1 to 7. Here 1 represent Sunday, 2 represent Monday and so on. Here we will ask the user to enter a number from range 1 to 7 and show the day equivalent to that number.… Read More »

## Write a Program in C++ & Python to Reverse a String

In this program, we will ask the user to enter a string and print out that string in reverse order.

## WAP in C++ & Python that finds the sum of elements above and below the main diagonal of a Matrix

Here in this program, we will code to find out the sum of non-diagonal elements and separate them with elements above the diagonal and elements below the diagonal. Here in this article, we will consider only one diagonal the left to right one.

## Write a program in C++ Using Switch Case to Check whether the given alphabet is a vowel or Not

Here in this program, we will code to find out whether the entered Alphabet is a Vowel or not.

## Linear Search in Python and C++

Here in the program, we will code to find an element stored in an array, using the linear search algorithm.

## Write a program in C++ and python to find the root of quadratic equation

Here in this program we will compute the 2 possible roots of a quadratic equation a quadratic equation is represented as ax2 + bx + c. a = coefficient of x2 b= coefficient of x c= constant C++: #include<iostream.h> #include< conio.h> #include<stdio.h> #include<math.h> void main() { clrscr(); float r_1,r_2,a,b,c,d,ip,rp; cout<<“Enter the coefficient of x^2; “;… Read More »

## Write a program in C++ and Python to calculate 3X3 Matrix multiplication:

In this program, we will code for the matrix multiplication. A matrix is a 2-D array which means a list inside a list. To multiply two matrices, their dimension should be the same and it should be a square matrix. A matrix is known as a square matrix when its number of rows is equal… Read More »

## Write a program in C++ and python to swap two numbers without using a temporary variable:

In this program, we will accept two values from the user and then swap their variable name. C++: #include<iostream.h> #include< conio.h> #include<stdio.h> #include<math.h> void main() { clrscr(); int num_1,num_2; cout<<“Enter num_1: “; cin>>num_1; cout<<“Enter num_2: “; cin>>num_2; num_1= num_1+num_2; num_2= num_1-num_2; num_1= num_1-num_2; cout<<“After swapping\n”; cout<<“The value of num_1 is: “<<num_1<<“\n”; cout<<“The value of num_2… Read More »