Advertisement
Kenpix

Untitled

May 17th, 2021
935
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.45 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4.  
  5. int main()
  6. {
  7.     int vectorTres[3][3][3];
  8.     int arreglo1[5][5];
  9.     int num;
  10.  
  11.  
  12.     printf("\nSe le pedira llenar los datos con numeros...");
  13.  
  14.     for (int i=0; i<=4; i++)
  15.     {
  16.         for (int j=0; j<=4; j++)
  17.         {
  18.             printf("\nDigite un numero: ");
  19.             scanf("\n%d", &num);
  20.             arreglo1[i][j] = num;
  21.         }
  22.     }
  23.  
  24.     printf("\nUsted digito los siguientes numeros....");
  25.     printf("\n");
  26.     for (int i=0; i<=4; i++)
  27.     {
  28.         for (int j=0; j<=4; j++)
  29.         {
  30.             printf("%d ", arreglo1[i][j] );
  31.         }
  32.         printf("\n");
  33.     }
  34.  
  35.     system("pause");
  36.     system("cls");
  37.  
  38.     printf("\nA continuacion se pedira llenar datos de la matriz 3x3...");
  39.     printf("\n");
  40.  
  41.     int numPedir;
  42.  
  43.     for (int i=0; i<=2; i++)
  44.     {
  45.         for (int j=0; j<=2; j++)
  46.         {
  47.             for (int z=0; z<=2; z++)
  48.             {
  49.                 printf("\nDigite un numero: ");
  50.                 printf("\n");
  51.  
  52.                 scanf("\n%d", &numPedir);
  53.  
  54.                 vectorTres[i][j][z] = numPedir;
  55.             }
  56.         }
  57.     }
  58.  
  59.     printf("\nA continuacion se mostraran los numeros que digito....");
  60.     printf("\n");
  61.  
  62.         for (int i=0; i<=2; i++)
  63.         {
  64.             for (int j=0; j<=2; j++)
  65.             {
  66.                 for (int z=0; z<=2; z++)
  67.                 {
  68.                     printf("%d ", vectorTres[i][j][z]);
  69.                 }
  70.             }
  71.             printf("\n");
  72.         }
  73.  
  74.     system("pause");
  75.     return 0;
  76. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement