Program to find leap year


     # include <iostream.h>
     int main( )
     {
    int year , y ;

    cout<<"\n Enter the year : " ;
    cin>>year;
    cout<<"\n The Year is : " << year;

    y = year % 4 ;
    y == 0 ?  cout<<" Leap Year !! " :  cout<<" Not a Leap Year !!";
    return 0;
      }

0 comments:

Post a Comment

 
 
 
 


Copyright © 2012 http://codeprecisely.blogspot.com. All rights reserved |Term of Use and Policies|