i use devc++ 4.9.9.2 in which language should i submit my code
and plz find error in the given code it is for problem stepford houses my comiler is giving correct ouput.
#include<iostream>
using namespace std;
void check(long int *p,long int n);
int main()
{
long int i,*p,n;
cout<<"enter the number of buildings:\n";
cin>>n;
p=new long int[n];
cout<<"enter the height of respective buildings:\n";
for(i=0;i<n;i++)
cin>>p[i];
cout<<"\nOUTPUT:\n";
check(p,n);
return 0;
}
void check(long int *p,long int n)
{
long int i,j,c=0;
for(i=0;i<n-1;i++)
for(j=i+1;j<n;j++)
if(p[i]>p[j])
c++;
cout<<c<<endl;
}