Laasya looking at the friends birthday list on a social media site likes to find if the particular person’s birthday year is a leap year or not.
Since many will have the same doubt she decides to automate the task by writing the code snippet for finding the same but she don’t know the logic to write it.
Can you help Laasya to accomplish her task?
Input:
The Single Line Containing the integer value representing year.
Output:
Print as either NOT A LEAP YEAR or LEAP YEAR after checking the year.
#include <stdio.h> int main() { int year; scanf("%d",&year); if((year%4==0) || (year%400==0)) { printf("LEAP YEAR"); } else { printf("NOT A LEAP YEAR"); } return 0; }
INPUT_1:
Year : 2004
OUTPUT:
LEAP YEAR
INPUT_2:
Year : 1994
OUTPUT:
NOT A LEAP YEAR
INPUT_3:
Year : 2012
OUTPUT:
LEAP YEAR
INPUT_4:
Year : 2008
OUTPUT:
LEAP YEAR
INPUT_5:
Year : 2020
OUTPUT:
LEAP YEAR
INPUT_6:
Year : 2018
OUTPUT:
NOT A LEAP YEAR
ILLUSTRATION
Morae! Q
- Find a triplet such that triplet is minimum of all the triplets.
- Rearrange characters in a string such that no two adjacent are same.
- Return the coordinates of all cells in matrix sorted by their distance.
- Function to verify the ISBN number from the book.
- Find out the absolute difference of values of two array integers.
- Rotate the array in the right direction by K steps.
- Find the sequence of moves that wins the game, collect exactly G coins!.
- Calculate the sum of boundary elements of a matrix.
- Find the total number of ways to reach the tree house.
- Compute profit and loss of a product.
- Find the total expense of purchased items.
- Determine the maximum sequence weight.
- Find the person’s birth year is a leap year or not.
- Find the inner rating with the displayed rating.
- Find if angles are valid to form a triangle.
- Find out the winner of the game from the given statistics.
- Verify the tag to determine if one needs to arrest or allow the vehicle.
- Find the largest hexadecimal number.
- Group up all anagrams together from given words.
- Return all anagrams from the given words.