Advertisement
Mastercpp

matrices

Sep 1st, 2015
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.52 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4.  
  5. int main(){
  6.    
  7.     int numeros [4][4];
  8.  
  9.     for(int i = 0; i<4; i++){
  10.         for(int j =0; j<4; j++){
  11.             printf("ingrese un numero para  la posicion [%i][%i] : ",i,j);
  12.             scanf("%i",&numeros[i][j]);
  13.         }
  14.     }
  15.    
  16.     // mostrando  lo arreglos
  17.     printf("\t\tMostrando Arreglos\n ");
  18.         for(int i = 0; i<4; i++){
  19.             for(int j =0; j<4; j++){
  20.                 printf("numeros[%i][%i] = %i \n",i,j,numeros[i][j]);
  21.             }
  22.     }
  23.  
  24.  
  25.     system("pause"); // esta es un funcion de la libreria stdlib.h  
  26.     return 0;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement