bubble sorting problem function not working code running but function not working : function is not working....i mean that array is not sorted it just prints the way i insert integers!

    #include <iostream>
    
    
    using namespace std;
    
    main()

    {
	int n;
 
    cout << "Enter size of array"<<endl;
    cin >> n;

    int A[n];

    for(int i = 0; i < n; i++)

    {

    cout << "enter integer"<<endl;
     cin >> A[i];

     }
    for (int i = 0; i < n; i++)

    {

    cout<<"Sorted Array: ";
    cout<<A[i]<<" ";

    }

     void bubblesort(int A[],int n);

    }

    void bubbleSort(int A[] , int n)

    {

    for(int i = 0; i < n; i++)

    {

    for (int j = 0; j < n -i-1; j++)

    {

    if(A[j] > A[j+1])

    {

    int swap = A[j];

    A[j] = A[j+1];

    A[j+1] = swap;

    }

    }

    }

    }
this is my code......the array is not able to be sorted i think my function is not working correctly so please can someone help?!
i often visit
www.geekforgeeks.com

