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
*/
Sur cette page du site, vous pouvez voir la vidéo en ligne Evil-Odious Number using Java Program | Taking Input from User | Java Program | @CodeWithAvi durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur CodeWithAvi 23 novembre 2022, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 63 fois et il a aimé 1 téléspectateurs. Bon visionnage!