HELP PLES!!

#include <iostream>




using namespace std;

main()
{
int n,i,v[20],x,p,s,maxx,sqrt;
cout<<"n=";
cin>>n;
for(i=1;i<=n;i++)
cout<<v[i];
for(s=0,i=1;i<=0;i++)
{
int prim=1;
for(int d=2;d<=(int)sqrt(v[i]);d++)
if(v[i]%d==0) prim=0;
if(prim)s+=v[i];
}
maxx=v[1];
for(i=2;i<=n;i++)
if(v[i]>maxx) maxx=v[i];
p=1;
for(i=1;i<=n;i++)
if(i%2==0) p*=v[i];
cout<<"x=";
cin>>x;
int este=0;
for(i=1;i<=n;i++)
if(v[i]==0);
{
cout<<i<<" ";
este=1;
}
if(!este) cout<<"nu exista";
return 0;
}
So my teacher gave me this program so i decided to try this home, when i wrote this thing in codeblocks i get this error: "sqrt cannot be used as a function"
I'm really bad at c++ and this is killing me, i don't know what to do.
P.S:I'm from romania so i apologize for my bad english.



Topic archived. No new replies allowed.