YAMILDIAZ

ejemplo 5

Jun 14th, 2023
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.40 KB | Source Code | 0 0
  1. #include <iostream>
  2. #include <cstdlib>
  3. using namespace std;
  4.  
  5. void listarElemtos(int vNum[], int elemento);
  6.  
  7. int main(){
  8. const int elemento=6;
  9. int vNum[elemento]={6, 8, 13, 18, 21, 22};
  10.  
  11.  
  12. listarElemtos(vNum, elemento);
  13.  
  14.  
  15. cout<<endl;
  16. system("pause");
  17. return 0;
  18. }
  19.  
  20. void listarElemtos(int vNum[], int elemento){
  21.     for (int i = 0; i < elemento; i++){
  22.         cout<<vNum[i]<<endl;
  23.     }
  24.  
  25. }
  26.  
Advertisement
Add Comment
Please, Sign In to add comment