code forces Watermelon

qingyezhu發表於2013-10-08
/*
 * Watermelon.cpp
 *
 *  Created on: 2013-10-8
 *      Author: wangzhu
 */

/**
 * 若n是偶數,且大於2,則輸出YES,
 * 否則輸出NO
 */
#include<cstdio>
#include<iostream>
using namespace std;
int main() {
    int n;
    while (~scanf("%d", &n)) {
        if (n > 2 && (n & 1) == 0) {
            printf("YES\n");
        } else {
            printf("NO\n");
        }
    }
    return 0;
}

 

相關文章