Can anyone help me figure out why this isn't compileing, i basiclly want the program to tell me if the array is all even. but its not compiling.
I keep getting these compiling errors
12 C:\Dev-Cpp\main.cpp expected `)' before '!' token
16 C:\Dev-Cpp\main.cpp expected primary-expression before "else"
16 C:\Dev-Cpp\main.cpp expected `;' before "else"
18 C:\Dev-Cpp\main.cpp expected primary-expression before "int"
18 C:\Dev-Cpp\main.cpp expected `;' before "int"
24 C:\Dev-Cpp\main.cpp expected `}' at end of input
Code:
#include <iostream>
using namespace std;
bool All_Even()
{
int x;
int a_array[5]= {4,2,4,5,6};
while(x =0 < 5)
{
if (a_array[x]!% = 0)
x++;
return false;
}
else return true;
int main()
{
cout<<"this program is all even" << All_even;
system("PAUSE");
return 0;
}