Q.) W.A.P to check the leap year or not in C using if else ?
#include<stdio.h>
#include<conio.h>
int main()
{
int a;
printf("enter an integer :\n");
scanf("%d",&a);
if (a>=0)
{
printf("This is a positive integer");
}
else{
printf( "This is a negative integer");
}
getch();
}
Output
enter an integer :
-14 /* say a = -14 */.
This is a negative integer