Problem in the code..please tell where i am wrong

#include
#include
#include
#include
using namespace std;

void maxHistogramArea(int a[],int n){

stack s;
//int n=a.size();
int maxarea=0,area=0;
int temp;
s.push(0);
//cout<<a[s.top()]<<endl;

for(int i=1;i<n;i++)
{
if(a[i]>a[s.top()] )
{
s.push(i);
continue;
}
while(a[i]<a[s.top()] or !s.empty())
{
temp=a[s.top()];
s.pop();

	if(s.empty())
	{
       area= temp*(i);
       cout<<area<<"area"<<endl;
	   maxarea=max(area,maxarea);
	}
	else
	{
		area= temp*(i-s.top()-1);
		cout<<area<<"area"<<endl;
		 maxarea=max(area,maxarea);
	}


}


 s.push(i);

}

cout<<maxarea<<“macx”<<endl;

}

int main() {
int n,i;
//vector a;
int a[100000];
cin>>n;
for(i=0;i<n;i++)
{
cin>>a[i];
}
//cout<<a[i-1]<<endl;
a[i]=0;
//cout<<a[i];
maxHistogramArea(a,n);
return 0;
}

hi @himanshuanand729 send the code on ide.codingblocks.com

I sent the code please check once.

Hi @himanshuanand729 where?..u need to write the code save it and then send the url of that page here after getting saved

here is my code.

hi @himanshuanand729 u can refer this