Advertisement
Kenpix

Untitled

May 17th, 2021
649
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.96 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. /*
  5.     -DECLARAR UN ARREGLO DE ENTEROS DE TAMAÑO 10
  6.     -DEBERÁ MOSTRAR EL CONTENIDO DE CADA UNO DE LOS 10 ELEMENTOS DEL ARREGLO EN PANTALLA
  7.     -MODIFIQUE EL PROGRAMA PARA QUE SOLICITE AL USUARIO 10 VALORES QUE SERÁN ASIGNADOS A CADA POSICION DE ARREGLO
  8.     -VUELVA A MOSTRAR LOS ELEMENTOS DEL ARREGLO EN PANTALLA
  9. */
  10.  
  11. int main()
  12. {
  13.     int  nume[10]= { 21, 21, 10, 20, 9, 15 , 14, 44 , 98, 31};
  14.     int n;
  15.  
  16.  
  17.     printf("Los siguientes datos del arreglo son: ");
  18.     for (int i=0; i<=9; i++){
  19.  
  20.         n=nume[i];
  21.         printf("\n%d",n);
  22.     }
  23.  
  24.     int nume2[10];
  25.     int num;
  26.  
  27.     printf("\nAhora debera digitar numeros...");
  28.  
  29.     for(int j=0; j<=9; j++)
  30.     {
  31.         printf("\nDigite un numero: " );
  32.         scanf("\n%d", &nume2[j]);
  33.  
  34.     }
  35.  
  36.     printf("\nEstos son los numeros que usted Digito....");
  37.  
  38.     for(int x=0; x<=9; x++)
  39.     {
  40.         printf("\n%d", nume2[x]);
  41.     }
  42.  
  43.     return 0;
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement