subject

Write a program that prints a conversion for a variety of numbers as specified by the user. The conversion from base 10 to some other base will be in the range base 2 through base 16. The principle of conversion includes the following steps:

Carry out successive divisions by the new base until a quotient is obtained that is less than the new base.
The ones digit corresponds to the first remainder. The next digit corresponds to the remainder after the quotient has been divided by the base again. The most significant digit is the first quotient less than the base.

Thus 83 [base 10] is 123 [base 8]
83/8 = 10 remainder 3
10/8 = 1 remainder 2
1/8 = 0 remainder 1

Notice that the numbers are written in reverse order of their calculations indicating that a recursive function may be the best way to proceed.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 24.06.2019 13:30
In the rgb model, which color is formed by combining the constituent colors? a) black b) brown c) yellow d) white e) blue
Answers: 1
question
Computers and Technology, 24.06.2019 21:30
Suppose a router has built up the routing table shown in the table. subnet number 128.96.39.00 28.96.39.128 128.96.40.00 192.4.153.0 default) subnet mask 255.255.255.128 255.255.255.128 255.255.255.128 255.255.255.192 nexthop interface 0 interface 1 r2 r3 r4. the router can deliver packets directly over interfaces 0 and 1, or it can forward packets to routers r2, r3, or r4. describe what the router does with a packet addressed to each of the following destinations: (a) 128.96.39.10 (b) 128.96.40.12 (c) 128.96.40.151 (d) 192.4.153.17 (e) 192.4.153.90
Answers: 3
question
Computers and Technology, 25.06.2019 05:00
How does computer network work in a paragraph
Answers: 1
question
Computers and Technology, 25.06.2019 06:30
If she presses the left arrow , what will happened
Answers: 1
You know the right answer?
Write a program that prints a conversion for a variety of numbers as specified by the user. The conv...
Questions
question
Biology, 06.10.2021 01:00
question
Mathematics, 06.10.2021 01:00