Write a program in C++ to find whether the entered year is LEAP YEAR or not

#include <iostream.h>
#include <conio.h>

int main() {
        
  int year;
    
  cout << "Enter Year: ";   
  cin >> year;
    
  (year%4)==0 ? cout<<"Leap Year" : cout<<"NOT Leap Year";
    
  getch();
  return 0;
}


Output:

Leave a Reply

Contact Form

Name

Email *

Message *

Followers