Advertisement
andredavid

Untitled

Apr 24th, 2018
350
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.79 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. void cargar ( int mat [ 3 ] [ 5 ] )
  5. {
  6.     int f, c;
  7.     f = 0 ;
  8.     mientras ( f < 3 )
  9.     {
  10.         c = 0 ;
  11.         mientras ( c < 5 )
  12.         {
  13.             printf ( "componente de Ingrese" ) ;
  14.             scanf ( "% i" , & mat [ f ] [ c ] ) ;
  15.             c = c + 1 ;
  16.         }
  17.         f = f + 1 ;
  18.     }
  19. }
  20.  
  21. void imprimir ( int mat [ 3 ] [ 5 ] )
  22. {
  23.     int f, c;
  24.     f = 0 ;
  25.     mientras ( f < 3 )
  26.     {
  27.         c = 0 ;
  28.         mientras ( c < 5 )
  29.         {
  30.             printf ( "% i" , mat [ f ] [ c ] ) ;
  31.             c = c + 1 ;
  32.         }
  33.         printf ( " \ n " ) ;
  34.         f = f + 1 ;
  35.     }
  36. }
  37.  
  38.  
  39. int main ( )
  40. {
  41.     int mat [ 3 ] [ 5 ] ;
  42.     cargar ( mat ) ;
  43.     imprimir ( mat ) ;
  44.     sistema ( "pausa" ) ;
  45.     return 0 ;
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement