/*WAP to check leap year*/
#include<stdio.h>
#include<conio.h>
void main()
{
int a;
clrscr();
printf("enter year");
scanf("%d",&a);
if(a%4==0)
printf("year is leap");
else
printf("year is'not leap");
getch();
}
there is some good c ,java, sql and vb6 programs,Windows tricks, sms shorthand etc
#include<stdio.h>
#include<conio.h>
void main()
{
int a;
clrscr();
printf("enter year");
scanf("%d",&a);
if(a%4==0)
printf("year is leap");
else
printf("year is'not leap");
getch();
}
#include<stdio.h>
#include<conio.h>
void main()
{
char any;
clrscr();
printf("enter any character");
scanf("%c", &any);
if(any>=48&&any<=57)
{
printf("it is digit");
}
else
if(any>=97&&any<=122)
{
printf("it is lowercase alphabat");
}
else
if(any>=65&&any<=90)
{
printf("it is upper case alphabat");
}
else
if(any>=32&&any<=47)
{
printf("it is special symbol");
}
else
if(any>=58&&any<=64)
{
printf("it is special symbol");
}
else
if(any>=91&&any<=96)
{
printf("it is special symbol");
}
else
if(any>=123&&any<=127)
{
printf("it is special symbol");
}
getch();
}
#include<stdio.h>
#include<conio.h>
void main()
{
int fact=1,n,i;
clrscr();
printf("enter number");
scanf("%d",&n);
for(i=1;i<=n;i++)
fact=fact*i;
{
printf("%d",fact);
getch();
}
}
#include<stdio.h>
#include<conio.h>
void main()
{
int n,i=1,fact=1;
clrscr();
printf("enter no.");
scanf("%d",&n);
while(i<=n)
{
fact=fact*i;
i++;
}
printf("%d",fact);
getch();
}