88 : C Program to read and print 3x3 matrix

Check out the complete list of c-programs : C Program List    












/*
 * 1000+ C programs + tutorials
 *
 * 
 * 88_c_program_do_display_3x3_matrix.c
 *  
 *  
 *
 *  Created on: Oct 25, 2014
 *  Author: Code2care.org
 */

#include 
//#include 

void main() {

int arr[3][3];
int i,j;

//clrscr();

printf("3x3 Matrix : ");


//Read the elements of the 3x3 matrix
for(i=0;i<=2;i++) {
    
    for(j=0;j<=2;j++) {
        
        printf("\nEnter element at location %d,%d : ",i+1,j+1);
        scanf("%d",&arr[i][j]);
        
         
    }

}
 printf("\n\n 3x3 matrix : \n\n");


//Read the elements of the 3x3 matrix
for(i=0;i<=2;i++) {
    
    for(j=0;j<=2;j++) {
        
        printf("%d  ",arr[i][j]);
         
    }
    
    printf("\n");

}



//getch();  
   
}









The best way to learn C programming is to practice more and more of programs . Code2care C Programming tutorials provide 1000+ programs in C that you can study and become an expert in the language. Programs are divided into categories depending upon type and complexity.

BSc. IT, BSc. Computer Science, BSc. IT, MSc. IT, MSc. Computer Science, MCA, BTech IT & BTech Engineers may find these programs very useful.