SCHOOL OF CODE BUILDERS
Learn To CODE. Become A DEVELOPER.
Pages
HOME
DATA STRUCTURES
STRINGS
ARRAYS
MATRIX
BINARY TREES
LINKED LIST
STACK
QUEUE
SORTING
SEARCHING
C
PYTHON
PSEUDOCODE
CONTEST PROBLEMS
ALGORITHMS
PATTERNS
PHP
C PUZZLES
C INTERVIEW QUESTIONS
JAVA
C++
HASHING
RECURSION
BASIC C PROGRAMS
TCS-CODEVITA
FACEBOOK
CONTACT US
C program to find nth power of a matrix
C program to find nth power of a matrix
Input:
Enter the elements of matrix:
1 2 3
4 5 6
7 8 9
Enter the power:
3
Output:
1 8 27
64 125 216
343 512 729
Implementation:
#include
#include
#include
#define r 3 // set the row size here #define c 3 // set the column size here int main(void) { int n; int i,j; int a[r][c]; printf("Enter the elements of matrix:\n"); for(i=0;i
PREVIOUS
NEXT
HOME