Why its showing error while compiling

using namespace std;
#include
#include

int main()
{
long long int n;
cin>>n;
long long int a[n];
for(long long int i=0;i<n;i++)
cin>>a[i];
long long int min,index;

for(int i=0;i<n;i++)
{
	index=min_element(a+i,a+n) - a;
	swap(a[index],a[i]);
}

for(int i=0;i<n;i++)
cout<<a[i]<<endl;

}

Here’s the updated code : ping me if you still have doubt

Hi @n.nishchaya2000

You need to write using namespace std after all #includes.

Hope it Helps.

i have already write namespace

please tell me the error in my code

the code u have provided it also showing error while compiling

I did not provide any code earlier.

This link’s code is compiling in my ide. Link : https://ide.codingblocks.com/s/213021

Hope it Helps.

@n.nishchaya2000
Please mark your doubt as resolved.