google.com, pub-6167773875660516, DIRECT, f08c47fec0942fa0 Write a C++ program to determine whether the year is a leap year - 2nd puc computer science

Write a C++ program to determine whether the year is a leap year

/*Write a C++ program to determine whether the year is a leap year */

#include<iostream.h>

#include<conio.h>

void main( )

{

int year ;

clrscr( );

cout<<"Enter the Year: ";

cin>>year;

if(year%4 ==0 && year%100!=0 || year%400 ==0)

cout<<"it is a leap year";

else

cout<<"it is not a leap year";

getch( );

}

Write a C++ program to determine whether the year is a leap year Write a C++ program to determine whether the year is a leap year Reviewed by Vision Academy on February 27, 2022 Rating: 5

No comments:

CheckOut

Powered by Blogger.