Hi,
When i write any code has if else statement , and run it na error appeatrs and say that else doesn't match with if or illegal else without matching if.
I don't know where is the problem exctly ,and you should know that i don't put } in these program.
For example this program-
#include<iostream>
using namespace std;
int main(){
int year ,month,day,leapyear;
cout<<"Enter a year and month ";
cin>>month>>year;
if ((year % 4 == 0) && ((year % 100 != 0) || (year % 400 == 0))){
leapyear=1;
cout<<"This is aleap year";
else{
cout<<"This is not leap year";
}
}
return 0;
}