Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<math.h>
- int main()
- {
- long long int t,i,a,cnt;
- scanf("%lld",&t);
- for(i=1;i<=t;i++){
- scanf("%lld",&a);
- printf("Case %lld: ",i);
- cnt=0;
- while(a!=0){
- if(a%2==1)
- cnt++;
- a/=2;
- }
- if(cnt%2==0)
- printf("even\n");
- else
- printf("odd\n");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement