Advertisement
Guest User

Untitled

a guest
Aug 25th, 2016
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. #include <istream>
  2. using namespace std;
  3. #include <conio.h>
  4. #include <stdio.h>
  5. void NhapMang(int a[], int *pn)
  6. {
  7. cout<<"Nhap vao n = ";
  8. cin>>pn;
  9. for (int i = 0; i < *pn; i++)
  10. {
  11. cout<<"a["<<i<<"] = ";
  12. cin>>a[i];
  13. }
  14. }
  15. void XuatMang(int a[], int n)
  16. {
  17. for ( int i = 0; i < n; i++)
  18. cout<<a[i]<<" ";
  19. }
  20.  
  21. int main()
  22. {
  23. int a[20], n;
  24. NhapMang(a,&n);
  25. XuatMang(a,n);
  26. _getch();
  27. return 0;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement