help me check why my /2/30 still valid==? which statment wrong

#include <iostream>
#include <conio.h>
#include <string>
using namespace std;

string date ( int year , int month , int day )
{
if(year<1990||year>2009)
return "Invalid";
else if (month<1 || month>12)
return "Invalid";
else if ( month==4,6,9,11 & day>30)
return "Invalid";
else if ( month==2 & year%4==0 & day>29)
return "Invalid";
else if ( month==2 & year%4==!0 & day>28)
return "Invalid";
else
return "Valid";
}

int main (){
int y,m,d;
cout<<"Enter Year : ";cin>>y;
cout<<endl;
cout<<"Enter Month : ";cin>>m;
cout<<endl;
cout<<"Enter Day : ";cin>>d;
cout<<"The Date "<<d<<" " <<m<<" "<<y<<" is "<<date(y,m,d);
getch();
}
for starters you need to use '&&' and not '&'.
duplicate post. I answered this in excruciating detail here:

http://www.cplusplus.com/forum/general/113124/
Topic archived. No new replies allowed.