MohamedAbdel3al

array

Aug 10th, 2021
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. #include <iostream>
  2. #include <algorithm>
  3. using namespace std ;
  4. typedef long long ll ;
  5.  
  6. void array (int arr[5] , int n) {
  7. for (int i = 0; i < n; i++) cout << arr[i] << " " ;
  8. }
  9.  
  10. int main() {
  11. ios_base::sync_with_stdio(false) , cin.tie(nullptr) , cout.tie(nullptr) ;
  12. int n ; cin >> n ;
  13. int arr[n] ;
  14. for (int i = 0; i < n; i++) cin >> arr[i] ;
  15. array(arr , n) ;
  16. return 0;
  17.  
  18. }
  19.  
  20.  
  21.  
Advertisement
Add Comment
Please, Sign In to add comment