Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <istream>
- using namespace std;
- #include <conio.h>
- #include <stdio.h>
- void NhapMang(int a[], int *pn)
- {
- cout<<"Nhap vao n = ";
- cin>>pn;
- for (int i = 0; i < *pn; i++)
- {
- cout<<"a["<<i<<"] = ";
- cin>>a[i];
- }
- }
- void XuatMang(int a[], int n)
- {
- for ( int i = 0; i < n; i++)
- cout<<a[i]<<" ";
- }
- int main()
- {
- int a[20], n;
- NhapMang(a,&n);
- XuatMang(a,n);
- _getch();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement