Home Basic Loop Array string Function Pointer Contact STUDY

AHF    C    PROGRAM    SOLVING

Programming tips

Iterative statement



" ; " after loop



Specifer



Test expression



Working with switch case




Array 2_D - read and display ( 3 * 3 ) matrix




// AHF C PROGRAM SOLVING

//solving here 2_D   ARRAY 	programming problem

#include<stdio.h> #include<math.h> #define pf printf int main() { int marks[3][3],i,j; // declaring a two dimensional array pf("\nEnter a 3x3 matrix: "); for(i=0;i < 3;i++) for(j=0;j < 3;j++) scanf("%d",&marks[i][j]); pf("\nThe given matrix is: "); for(i=0;i < 3;i++) { pf("\n"); for(j=0;j < 3;j++) pf("%d\t",marks[i][j]); } return 0; }
OUTPUT:


© 2018 - All rights reserved