Advertisement
d3dx939dll

Aula37 - Funções Que Recebem Matrizes

Jan 13th, 2021
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.46 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. //Versao com funcao
  4. int main(void){
  5.     void funcaoPrint(int x[3][3]);
  6.     int matriz[3][3] = {1,2,3,4,5,6,7,8,9};
  7.  
  8.     funcaoPrint(matriz);
  9.     return 0;
  10. }
  11. void funcaoPrint(int x[][3]){
  12.  
  13.     int i, j;
  14.     for (i = 0; i < 3; ++i){
  15.         for(j = 0; j < 3; ++j){
  16.             printf("%i\n", x[i][j]);
  17.         }
  18.         printf("\n");
  19.     }
  20. }
  21.  
  22. //Sobre
  23.  
  24. //Aula: Funções que Recebem Matrizes (#37)
  25. //Video: youtube.com/watch?v=t3wDtXpu8ig
  26.  
  27. //Data: 13/01/2021
  28. //Grupo: Heikoa
  29.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement