Question: Write a program that will ask the user for a number in the Decimal base system. Then use a while loop that starts from 2
Write a program that will ask the user for a number in the Decimal base system. Then use a while loop that starts from and counts down by binary values.
Determine each digit of the binary number.
Print out each digit of the binary number on the same line, leading zeros are allowed and required for full credit
You may not use String variables, Conditionals, or Arrays in your code.
If you need help developing a plan for this program:
Look back at your Introduction to Go watch the Binary Conversion Videos
What are the steps in the process that happen again and again?
What needs to change between each occurrence?
Consider using modulus and integer division...
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
