Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //even or odd upto 2^100
- #include<stdio.h>
- int main()
- {
- int i,t;
- char num[101];
- scanf("%d",&t);
- for(i = 0; i<t; i++)
- {
- scanf("%s",&num);
- if((num[strlen(num)-1]) % 2 == 0)
- printf("even\n");
- else
- printf("odd\n");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment