Why am I getting WA?

Problem is in Challenges-Fundamentals section
Problem name is Increasing Decreasing Sequence

My code :
#include<bits/stdc++.h>
using namespace std;

int main() {
int n;cin>>n;
int A[n];
for(int i=0;i<n;++i)cin>>A[i];
int i=0,
while(i<n-1 && A[i] < A[i+1]) ++i;
while(i<n-1 && A[i] > A[i+1]) ++i;
if(i==n-1 && ic)cout<<“true”;
else cout<<“false”;
return 0;
}