In this video we are going to learn how we can take inputs from the user as a Number and evaluate it and find if it is a Evil-Odious Number or not and print it to the user using Java Program.
/*
Evil Numbers: An evil number is a non-negative n umber that has an even number of 1s in its binary expansion (i.e. in base-2 numeral system, Os and 1s).
Odious Numbers: Numbers that are not Evil are called Odious Numbers.
For example:
3 is an Evil Number as its binary representation contain even (2) number of 1s.
Binary Re. of 3-011 --- 2 One's
15 is an Evil Number as its binary representation contain even (4) number of 1s.
Binary Re. of 15 - 1111 --- 4 One's
16 is an Odious Number as its binary representation contain odd (1) number of 1s.
Binary Re. of 16 - 10000 --- 1 One's
*/
On this page of the site you can watch the video online Evil-Odious Number using Java Program | Taking Input from User | Java Program | @CodeWithAvi with a duration of hours minute second in good quality, which was uploaded by the user CodeWithAvi 22 November 2022, share the link with friends and acquaintances, this video has already been watched 53 times on youtube and it was liked by 3 viewers. Enjoy your viewing!