Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- int Mang( int n) {
- int *a = new int[n];
- for (int i = 0; i < n; i++) {
- cout << "nhap a[" << i + 1 << "]";
- cin >> a[i];
- }
- return 0;
- }
- int main()
- {
- int n;
- cout << "nhap chieu dai cua mang : ";
- cin >> n;
- int *a = new int[n];
- return Mang(n);
- system("pause");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement