Advertisement
DimasDark

L0Q2

May 23rd, 2013
275
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.64 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <stdbool.h>
  4.  
  5. int main()
  6. {
  7. freopen("L0Q2.in", "r", stdin);
  8.  
  9. freopen("L0Q2.out", "w", stdout);
  10.  
  11. int i, j, l, c, numero = 0, l1, c2;
  12.  
  13.  
  14. scanf(" %d %d", &i, &j);
  15. int matrix[i][j];
  16.  
  17.  
  18. for (l = 0; l < i; l++) {
  19.     for (c = 0; c < j; c++) {
  20.         scanf("%d", numero);
  21.         matrix[l][c] = numero;
  22.     }
  23. }
  24.  
  25. for (l = 0; l < i; l++) {
  26.     for (c = 0; c < j; c++) {
  27.         if (c == j-1)
  28.             printf("\n");
  29.         printf("%d", matrix[l][c]);
  30.     }
  31. }
  32.  
  33.  
  34. return 0;
  35. }
  36.  
  37. bool podeMultiplicar(int l1, int c2) {
  38. bool mult = true;
  39. if (l1 != c2)
  40.     mult = false;
  41. return mult;
  42.  
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement