Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

write a script to check whether user enter a value is a
leap year or not?

Answer Posted / sourisengupta

#call this function by passing the year....


sub isLeapyear
{
$year=shift;
if($year%4==0){
if($year%100==0){
if($year%400==0)
return 1;
return 0;
}
return 1;
}
}

Is This Answer Correct ?    14 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain grooving and shortening of arrays and splicing of arrays?

902


Can you add two arrays together?

933


Write syntax to use grep function?

976


What syntax is used for grep() function?

1188


What is it meants by '$_'?

903


What's the difference between /^Foo/s and /^Foo/?

1193


Explain about the applications of perl?

977


How would you ensure the re-use and maximum readability of your perl code?

938


Explain tk?

999


Why to use perl?

957


Explain chomp?

932


Explain the default scope of variables in perl?

946


Explain goto name?

943


What are some of the key features of objects in perl?

946


What is the use of -w, -t and strict in Perl?

999