PROGRAMS 1) Please write a complete C program to make addition, multiplication and transpose operations of two matrices. First, define 2 different matrices as mati[10][10] and mat2[10][10] and use the random number function to generate elements of matrices. The random numbers will be between X-100) and 100. Second, create 3 different functions add_matrices () for addition of matrices, multp_matrices() for multiplication of matrices and transpose_matrices() to take transpose of matrices. Then print results to screen. Matrice 1: Matrice 2: Addition of Matrices: Multiplication of Matrices: Tranpose of Matrice 1: Tranpose of Matrice 2: 2) Please write a complete C program to apply Linear Search algorithm. Define an array with name numbers (20) and ask to user enter elements of arrays. Then ask a number to search in array and apply linear seurch algorithm to find this number If number is element of array, print the location of number in array If number is not in the array then print the number is noun array The output of program will like below: Enter 20 different numbers: 2,5, 7, 8, 9, 11, 41, 25, -52, -36, 87,96, 82, 46,57, 32, 16, 19, -3,91 Enter a number to search in array: 25 Result: 25 found at location 7.
没有找到相关结果