Write a program that converts a given decimal number to its corresponding binary representation. A positive decimal number can be converted to a binary number using the following algorithm:
quotient = number result = "" while (quotient > 0) bit = quotient % 2 quotient = quotient / 2 result = bit + result
Below is an example execution of the task. The text in red represents user input and is logically not printed by your program.
Enter a decimal number:
713
The number 713 is 1011001001 in binary representation.