Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Binär
- {
- public String toBinäry(int n)
- {
- String output = "";
- int wert = 1024;
- int z;
- while(n > 0){
- if(n % 2 == 0){
- output = output + "0";
- }else{
- output = output + "1";
- }
- n = n / 2;
- }
- return output;
- }
- }
Add Comment
Please, Sign In to add comment