admin@onlinelearningcenter.in (+91) 7 999 01 02 03

Odd or even sum of digit

Given a positive integer as input, you have to find whether the sum of its digits is odd or even.

The input will have a positive integer and the output should say "odd" if the sum of its digits is odd and "even" if the sum of its digits is even.

Sample Input:
1234567
Sample Output:
even

Published By : Vaibhav G. Khetal
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.

Comments

Jquery Comments Plugin