Pages

Friday, February 5, 2016

C program to read values in 2-D Array.

#include<stdio.h>
int main()
{
  int a[2][2];
  int i, j; 
  //Logic to read matrix
  for ( i = 0; i < 2; i++ ) //related to row
  
for ( j = 0; j < 2; j++ ) //related to column

scanf("%d", &a[i][j] ); 

  }
  return 0; 
}

No comments:

Post a Comment