Solution: The number of rows and columns in A is equal to number of columns and rows in B respectively. Thus, the matrix B is known as the Transpose of the matrix A. The transpose of matrix …
Solution: In this approach, we read the size of matrix using m and n variables. We use the same dimension to read both matrix elements. After perform multiplication, we store the results into third matrix. …
Solution: In this code, we use bubble sort algorithm to sort the elements in array. We assume list is an array of n elements. We further assume that swap function swaps the values of the …
Solution: In this approach, we take two arrays to store even and odd numbers after separation. We repeat the loop from start index to end index and check the element is even or not. We …
Solution: Array is a collection of similar type of elements. Array allowed storing duplicate values also. In this code, we display only elements which are uniquely present in the array. We use nested loop to …
Solution: A positive integer is called an Armstrong number (of order n) if xyz… = x^n + y^n + z^n In the case of an Armstrong number of 3 digits, the sum of cubes of …
1 + 1/2 + 1/3 + 1/4 + 1/5 … 1/n terms.
Factorial Program in C: Factorial of n is the product of all positive descending integers. Factorial of n is denoted by n!. For example: 5! = 5*4*3*2*1 = 120 3! = 3*2*1 = 6 Approach-1: …
Approach-1: Simple menu driven programs are very helpful to students in application development. In this code, we created a simple menu used to perform all computational operations on geometrical shapes In this approach, we execute …