#7264: 狂RF,但是用DEV C++卻OK


WeiFong (WeiFong)


#include <cstdlib>
#include <iostream>

using namespace std;

int main(int argc, char *argv[])
{
    int a;
    
    while (cin>>a){
    
    if(a%4==0 && a%100!=0)
    
    cout<<"閏年";
    
    else if(a%400==0)
    
    cout << "閏年";
    
    else
    
    cout << "平年"; 
    
    cout<<endl; 
    }
    system("PAUSE");
    return EXIT_SUCCESS;
}

#7265: Re:狂RF,但是用DEV C++卻OK


linishan (L)


#include
#include

using namespace std;

int main(int argc, char *argv[])
{
    int a;
    
    while (cin>>a){
    
    if(a%4==0 && a%100!=0)
    
    cout<<"閏年";
    
    else if(a%400==0)
    
    cout << "閏年";
    
    else
    
    cout << "平年"; 
    
    cout<
    }
    system("PAUSE");
    return EXIT_SUCCESS;
}
 
 
別用建新專案的方式 程式碼自己打