What's wrong with this code?

/******************************************

  • AUTHOR : PRIYAM THAKURIA*
  • NICK : psiphon_hack *
  • INSTITUTION : NIT Kurukshetra *
    ******************************************/
    #include<bits/stdc++.h>
    #define ll long long int
    #define mod 1000000007
    #define fastio ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);

using namespace std;

int main() {

#ifndef ONLINE_JUDGE
freopen(“input.txt”, “r”, stdin);
freopen(“output.txt”, “w”, stdout);
#endif
fastio

int n;
cin >> n;
int a[n];
for (int i = 0; i < n; i++)
	cin >> a[i];
/*for (int i = 0; i < n; i++)
	cout << a[i] << " \n";
*/for (int i = 1; i < n; i++)
	for (int j = 0; i < (n - i - 1); j++)
		if (a[j] > a[j + 1])
			swap(a[j], a[j + 1]);
for (int i = 0; i < n; i++)
	cout << a[i] << " \n";

return 0;

}

@priyamthakuria27 i should run from 0 to n-1 and j<(n-i-1) u have written i<n-i-1 typo mistake
corrected https://ide.codingblocks.com/s/240912
i hope its clear if yes dont forget to mark it as resolved :smiley: