Advertisement
SergeyPGUTI

7.1.6

Nov 27th, 2015
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.31 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3.  
  4. using namespace std;
  5.  
  6.  
  7. void change(int *arr, int n,int val)
  8. {
  9.     *(arr+n)=val;
  10. }
  11.  
  12. int main()
  13. {
  14.     int n;
  15.     cin>>n;
  16.     int *Mas=new int[n];
  17.     for (int i=0;i<n;i++)
  18.     {
  19.         cin>>Mas[i];
  20.     }
  21.     change(Mas,4,3);
  22.     cout<<Mas[4];
  23.     return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement