#2431: 已經是好多次都不行~~幫忙一下


vinny172 (AbreU)


#include<stdio.h>  
#include<stdlib.h>  
#include<cstdlib>  
#include<iostream>  
using namespace std;  
int main()  
{  
    int a;  
    cin >> a;  
    if(a%4==0&&a%100!=0||a%400==0)  
    cout << "閏年" <<endl;  
    else 
    cout << "平年" <<endl;  
    system("pause");  
    return 0;  

 

 

以上有錯嗎?  小弟剛開始寫程式,麻煩各位幫忙一下...

#2433: Re:已經是好多次都不行~~幫忙一下


a13032002 (國王的子民(23rd))


#include  
#include  
#include  
#include  
using namespace std;  
int main()  
{  
    int a;  
    cin >> a;  
    if(a%4==0&&a%100!=0||a%400==0)  
    cout << "閏年" <
    else 
    cout << "平年" <
    system("pause");  
    return 0;  

 

 

以上有錯嗎?  小弟剛開始寫程式,麻煩各位幫忙一下...

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