- How to Add Google Analytics to Blogger
- 3 Fast Ways to Make Money on Internet in 2014
- Tips to Really Make Money on Internet
- Amazon launches Fire TV, wants you to watch Prime videos on big screen
- YouTube CPA review – Is it really worth it
- All India Bakchod, a startup that lives and sells humour
- FreeKaaMaal’s journey to 200k users and 4.5 mn monthly traffic
- Google AdWords: Tips to Organize your Adwords Account for better results
- Google AdWords 3 steps to choose keyword for AdWord Compaign Success!
- What is Internet Marketing & eCommerce Explained
Write a program using conditional operators to determine whether a year entered through the keyboard is a leap year or not.
Definition of leap year:
Rule 1: A year is called leap year if it is divisible by 400. For example: 1600, 2000 etc leap year while 1500, 1700 are not leap year.
Rule 2: If year is not divisible by 400 as well as 100 but it is divisible by 4 then that year are also leap year. For example: 2004, 2008, 1012 are leap year.
Leap year logic or Algorithm of leap year or Condition for leap year:
IF year MODULER 400 IS 0
ELSE IF year MODULER 100 IS 0
ELSE IF year MODULER 4 IS 0
// Program to determine whether a year is leap year or not using conditional operators#include
year%100==0?(year %400==0?printf(“leap Year”)
:printf(“Not a Leap Year”)):(year%4==0?
printf(“Leap Year”):printf(“Not a leap Year”));
printf(“nnnnnPress any key to exit…”);