#include<stdio.h>
#include<conio.h>
void main()
{
int a;
printf("Enter year");
scanf("%d",&a);
if(a%4==0)
{
printf("It is a leap year");
}
else
{
printf("It is not a leap year");
}
getch();
}
Code for product of digits 1 to 10(Using for loop) #include<stdio.h> #include<conio.h> void main() { int i,m=1; for(i=1;i<=10;i++) { m=m*i; } printf("Product=%d",m); getch(); } Product
Comments
Post a Comment