0

“lvalue required as left operand of assignment” in “if” part. How can i correct my code ??

#include <iostream> using namespace std; int main() { int t, n, a, b, c; cin>>n; for (t=0; t<n; t++){ while(cin>>a>>b>>c){ if ((a+b>c || a+c>b || b+c>a) && (a=b || b=c || a=c )) cout<< "1" << "1" ; else if ((a+b>c || a+c>b || b+c>a) && (a=!b || b=!c || a=!c )) cout << "1"<<"0" ; else cout << "0" <<endl; } } return 0; }

21st Feb 2020, 8:22 AM
Hale Julieanne
Hale Julieanne - avatar
2 RĂ©ponses
+ 2
use == not = == for comparing = for assigning
21st Feb 2020, 8:28 AM
Taste
Taste - avatar
0
okey i corrected them and it worked thank you ;)
21st Feb 2020, 8:52 AM
Hale Julieanne
Hale Julieanne - avatar