Advertisement
kozubovskyy

vettore capibile

Nov 25th, 2021
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.38 KB | None | 0 0
  1. #include <iostream>
  2. #define dim 3
  3. using namespace std;
  4.  
  5. void funzione(int vett[] , int d = dim);
  6.  
  7. int main()
  8. {
  9.     int d = dim ;
  10.     int vett[d] ;
  11.     funzione( vett , d ) ;
  12.     for (int i = 0 ; i<d ; i ++)
  13.     {
  14.         cout << vett[i] ;
  15.     }
  16.     return 0;
  17. }
  18.  
  19. void funzione(int vett[], int d)
  20. {
  21.     for ( int i = 0 ; i < d ; i++ )
  22.     {
  23.         cout << "Riempi erray" ;
  24.         cin >> vett[i] ;
  25.     }
  26.    
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement