fork download
  1. #include <stdio.h>
  2.  
  3. void verifica_quadrado_magico(int dim, int matriz[dim][dim]){
  4. int i, j;
  5.  
  6. for(i = 0; i < dim; i++){
  7. for(j = 0; j < dim; j++){
  8. printf("%i\t", matriz[i][j]);
  9. }
  10. printf("\n");
  11. }
  12. }
  13.  
  14. int main()
  15. {
  16. int mat[3][3] = {{8, 0, 7}, {4, 5, 6}, {3, 10, 2}};
  17. verifica_quadrado_magico(3, mat);
  18. }
  19.  
Success #stdin #stdout 0s 9424KB
stdin
Standard input is empty
stdout
8	0	7	
4	5	6	
3	10	2