Friday, April 16, 2010

Leap Year using If

#include<iostream.h>
#include<conio.h>
 void main()
 {
 clrscr();
 int y;
 cout<<"enter any year";
 cin>>y;
 if(y%4==0)
 cout<<"leap year";
 else
 cout<<"not";
 getch();
 }

No comments:

Post a Comment