Tuesday, 4 October 2016

To check whether a year is Leap year or not .

#include<iostream.h>
#include<conio.h>
void main()
{
int a;
clrscr();
cout<<“enter the year”;
cin>>a;
if(a%4==0)
{
cout<<“this is a leap year”;
}
else
{
cout<<“this is not a leap year”;
}
getch();
}

No comments:

Post a Comment

Basic Implementation of Array as a Pointer

#include<iostream.h> #include<conio.h> void main() { clrscr();   int arr[5];   cout<<"Enter 5 nos. ";   f...