Co jest niepoprawnego w tym programie? Wyskakuje mi błąd w 13 linijce.
/tmp/gFjWZTAK7T.cpp: In function 'int main()':
/tmp/gFjWZTAK7T.cpp:13:20: error: lvalue required as left operand of assignment
13 | if((( 20 * x ) - ( 18 * x ) ) = 1073 )
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~
#include <iostream>
#include <stdlib.h>
#include <cmath>
using namespace std;
int main()
{
int licznik = 0;
for( int x = 0; x <= 300; x++ )
{
if( x != 0 )
{
if((( 20 * x ) - ( 18 * x ) ) = 1073 )
{
cout << "Liczba " << x << " spełnia to równanie" << endl;
licznik++;
}
}
}
cout << "Było " << licznik << " liczb w przedziale [0, 300] ] spełniających to równanie";
system( "PAUSE" );
return 0;
}