2009年7月21日 星期二

Leap Year (c++)



#include <iostream>
using namespace std;

int main(void){
int year;
cin>> year;
if(year%4==0 && year%100!=0||year%400==0)
cout<<year<<" is Leap Year"<<endl;
else
cout<<year<<" is not Leap Year"<<endl;

return 0;
}

沒有留言:

張貼留言