想看題目請點我
#include<iostream> using namespace std; int main() { int i , year , count = 1 ; while(cin >> i) { while(cin >> year) { cout << "Case " << (i%i) + count << ": " ; count++ ; if((year%4==0)&&(year%100!=0) || (year%400==0) ) cout << "a leap year" << endl ; else cout << "a normal year" << endl ; } } return 0; }