A program that prints Binary (java)

About the client

United States

Posted on Apr 03, 2016 / Est. budget $ 75 / Project closed

Awarded winner(s):

Achuks
Achuks

Question is :

Write a program that reads a number and prints all of its binary digits. Print the remainder %2, then replace the number with / 2. Keep going until the number is 0. For example , if the user provides the input 13 , the output should be.

1
0
1
1

this program should be able to produce outputs for numbers 6, 234, 3122 and 83112

the topics covered before this question are while loops, for loops, and do loops.

Project bids (2)

Bids are visible only by project owner and Premium members.