dont know why its wrong

i did this c++ program and its not working and iam nt sure why..it would be great if i was told why??

#include <iostream>
using namespace std;
int main ()
{ int n1,n2,n3;
int total;
cout<<"Enter three intgers n1 n2 n3"<<endl;
cin>>n1,n2,n3;

if (n1>n2&& n2>n3&& n1>n3);
{
(n1+n2)=total;
cout<<"total"<<endl;
}
else if (n1<n2 && n3>n1 &&n3>n2);
{
(n1+n3)=total;
cout<<"total"<<endl;
}
else if
{
(n2+n3)=total;
cout<<"total"<<endl;
}
return 0;
}



Thanks
Operator = assigns the value on the right to the variable to the left, so (n2+n3)=total; and alike won't work

PS:
Use [code][/code] tags
And read http://www.cplusplus.com/forum/articles/1295/
I would recommend http://www.cplusplus.com/doc/tutorial/ .
Go through the Basics of c++.
thanks that help makes sense.
Topic archived. No new replies allowed.