Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int evenodd(int n)
- {
- if (n%2==0)
- {
- return 1 ;
- }
- else
- {
- return 2;
- }
- }
- int main()
- {
- int n,ans,even,odd;
- scanf("%d",&n);
- ans= evenodd(n);
- if (ans==1)
- {
- printf("even");
- }
- else if (ans==2)
- {
- printf("odd");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement