Evil-Odious Number using Java Program | Taking Input from User | Java Program | @CodeWithAvi

Pubblicato il: 22 novembre 2022
sul canale di: CodeWithAvi
53
3

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
*/


In questa pagina del sito puoi guardare il video online Evil-Odious Number using Java Program | Taking Input from User | Java Program | @CodeWithAvi della durata di ore minuti seconda in buona qualità , che l'utente ha caricato CodeWithAvi 22 novembre 2022, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 53 volte e gli è piaciuto 3 spettatori. Buona visione!