#include using namespace std; void nhap_mang(float a[], int n) { for (int i = 0; i < n; i++) { cout<<"a["<>a[i]; } } void hien_thi_nguoc(float a[], int n) { cout<<"Mang a theo thu tu nguoc la: "<= 0; i--) { cout<<"\t"<= k; i--) { a[i+1] = a[i]; } a[k] = x; n++; } void nhap_x(float a[], int n) { float x; cout<<"\nNhap x: "; cin>>x; for (int i = 0; i < n; i++) { if (a[i] <= x) { chen_phan_tu(a, n, i, x); break; } } cout<<"Mang sau khi chen phan tu x "<>n; if (n < 1 || n > 30) cout<<"Nhap so nguyen 1 <= n <= 30"< 30); nhap_mang(a,n); hien_thi_nguoc(a,n); sap_xep(a,n); nhap_x(a,n); return 0; }