I need this for school and can't make it work
_______________ _______________ _______________ _______________ ______
#include<iostre am.h>
int a,b,c;
int main()
{
cin>>a>>b>>c;
if((a+b)/2=c)
cout<<"corect";
else
if((a+c)/2=b)
cout<<"corect";
else
if((c+b)/2=a)
cout<<"corect";
else
cout<<"incorect ";
return 0;
}
_______________ _______________ _______________ _______________ ______
a.cpp: In function `int main()':
a.cpp:6: error: non-lvalue in assignment
a.cpp:9: error: non-lvalue in assignment
a.cpp:12: error: non-lvalue in assignment
Can somebody help me please
_______________ _______________ _______________ _______________ ______
#include<iostre am.h>
int a,b,c;
int main()
{
cin>>a>>b>>c;
if((a+b)/2=c)
cout<<"corect";
else
if((a+c)/2=b)
cout<<"corect";
else
if((c+b)/2=a)
cout<<"corect";
else
cout<<"incorect ";
return 0;
}
_______________ _______________ _______________ _______________ ______
a.cpp: In function `int main()':
a.cpp:6: error: non-lvalue in assignment
a.cpp:9: error: non-lvalue in assignment
a.cpp:12: error: non-lvalue in assignment
Can somebody help me please
Comment