Hi I am new in the programming. I know how a function works and if statement, so I want to know how would I be able to write an if & else statement in a function and would display the answer to the user. there may not be any goto statements
The code is as follows:
if(year < 1583) //considers if a year input is less than 1583 which is the starting year for this calendar
{
printf("\n\nPlease select a year after 1583 \n\n");
goto YEAR;
system("cls");
}
if(Leap_year(year))//if statement calls Leap Year function
{
printf("\t ======================= \n");
printf("\t* THIS IS A LEAP YEAR *\n");
printf("\t ======================= \n\n");
}
else {
printf("\t ======================= \n");
printf("\t* THIS IS NOT A LEAP YEAR *\n");
printf("\t ======================= \n\n");
}