STARTER_03 editorial

[Practice](CodeChef STARTER_03)

Author: Shaikh Shadab
Tester: Rushikesh Thakare
Editorialist: Nilprasad Birajdar

DIFFICULTY:

CAKEWALK

PREREQUISITES:

None

PROBLEM:

You will take year as input and print it is a leap year or not

SOLUTIONS:

Setter's Solution

#include
using namespace std;

int main() {
// your code goes here
int t, year;
cin>>t;
for(int i =0; i<t;i++){
cin>>year;
if((year%4==0 && year%100!=0) || year%400==0){
cout<<year<<" It is a leap year"<<endl;
}
else{
cout<<year<<" Not a leap year"<<endl;
}

}
return 0;

}