Advertisement
Guest User

Untitled

a guest
May 25th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #define HAUTEUR 20
  4. #define LARGEUR 20
  5.  
  6.  
  7. void remplir_grille(int *tab[HAUTEUR][LARGEUR])
  8. {
  9. int i = 0,j = 0;
  10. for(i=0;i<HAUTEUR;i++)
  11. {
  12. for(j=0;j<LARGEUR;j++)
  13. {
  14. *tab[i][j] = "1";
  15. }
  16. }
  17. }
  18.  
  19.  
  20.  
  21.  
  22. void afficher_grille(int *tab[HAUTEUR][LARGEUR])
  23. {
  24. int i = 0,j = 0;
  25. for(i=0;i<HAUTEUR;i++)
  26. {
  27. for(j=0;j<LARGEUR;j++)
  28. {
  29. printf("%d |",*tab[i][j]);
  30. }
  31. }
  32. }
  33.  
  34. int main(){
  35. int grille[HAUTEUR][LARGEUR];
  36.  
  37. //afficher_grille(&grille);
  38. remplir_grille(&grille);
  39. afficher_grille(&grille);
  40.  
  41. return 0;
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement