I have tried my best to remove this error .but the program is not working .
i have attached the problem below
click here
My CODE LINK IS
click here
plz give me the reason why it is showing error and also corrected code (or even its link)
I have tried my best to remove this error .but the program is not working .
i have attached the problem below
click here
My CODE LINK IS
click here
plz give me the reason why it is showing error and also corrected code (or even its link)
HELP ME FAST
Since ZCO Practice Contest is an ongoing contest for practice, the submissions are not visible. Paste your code in pastebin.com or ideone.com and then share its link.
#include
#include<math.h>
using namespace std;
int main() { int n; long a[10],i;long profit=0;long diff;int j;
cin>>n;
for(i=0;i<n;i++)
{cin>>a[i];}
for(i=0;i<n;i++)
{for(j=i+1;j<n;j++)
{diff=abs(a[i]-a[j]);
profit+=diff;
}
}
cout<<profit<<endl;
return 0;
}
FAST PLZ…THNKS C_UTKARSH …
NOT WORKING???