let's start Code

1182 - Parity

                                      1182 - Parity



#include<bits/stdc++.h>
using namespace std;

int main()
{
    int t;
    cin >> t;
    for(int cs = 1; cs <= t; cs++){
        int x;
        cin >> x;
        if(__builtin_parity(x))cout << "Case "<<cs<< ": odd\n";
        else cout << "Case "<<cs<< ": even\n";
    }
    return 0;
}

Share:

No comments:

Post a Comment

About

let's start CODE

Popular Posts