Computer Science, asked by sophiamanojbihpcxi43, 1 year ago

How to extract digits in java from a number

Answers

Answered by kumarkshitij552
2
Hey digits of a number in java are extracted using % (modulus) operator.

This is how digits are extracted in java.
If you have any doubt pls leave a comment.
// denotes comments in java don't think that it is a code of the program.
Comments are simply used to increase the understandability of the program.
Attachments:

sophiamanojbihpcxi43: ya
kumarkshitij552: ok then
kumarkshitij552: hey is there any program on this extraction
kumarkshitij552: or you just want to know it
sophiamanojbihpcxi43: there are programs but I just want to know the perfect way of writing
kumarkshitij552: ok
sophiamanojbihpcxi43: like to check whether a number is unique no. or not
sophiamanojbihpcxi43: spy number niven number
kumarkshitij552: I have given you the new answer.
sophiamanojbihpcxi43: Thnxxxx
Similar questions