hello guys this is my first attempt in C++ and i am getting an error :(
the programs is made to read 20 numbers and find how many of them are even (like 2,4,6,20,40)
#include <iostream>
using namespace std;
int c[20];
int s = 0;
int i = 1;
int main()
{
cout << "Enter the numbers followed by the ENTER key\n";
loop:
cin >> c[i];
if(c[i]%2=0) //line with error
{s++;}
i++;
if (i<=20) goto loop;
cout << "done!\n Number of values: ";
cout << s;
system("PAUSE");
return 0;
}
and the error:
In function `int main()'
line 14: error: non-lvalue in assignment