Write a program that prints a table of binary, octal and hexadecimal equivalents
ID: 3617164 • Letter: W
Question
Write a program that prints a table of binary, octal and hexadecimal
equivalents of the decimal numbers in the range 1 through 256.
Decimal Binary Octal Hex
===============================================
0 00000000 000 00
1 00000001 001 01
2 00000010 002 02
3 00000011 003 03
4 00000100 004 04
5 00000101 005 05
6 00000110 006 06
7 00000111 007 07
8 00001000 010 08
9 00001001 011 09
10 00001010 012 0a
11 00001011 013 0b
12 00001100 014 0c
13 00001101 015 0d
14 00001110 016 0e
15 00001111 017 0f
16 00010000 020 10
17 00010001 021 11
18 00010010 022 12
19 00010011 023 13
20 00010100 024 14
21 00010101 025 15
22 00010110 026 16
23 00010111 027 17
24 00011000 030 18
25 00011001 031 19
26 00011010 032 1a
27 00011011 033 1b
28 00011100 034 1c
29 00011101 035 1d
30 00011110 036 1e
31 00011111 037 1f
32 00100000 040 20
33 00100001 041 21
34 00100010 042 22
...
...
...
241 11110001 361 f1
242 11110010 362 f2
243 11110011 363 f3
244 11110100 364 f4
245 11110101 365 f5
246 11110110 366 f6
247 11110111 367 f7
248 11111000 370 f8
249 11111001 371 f9
250 11111010 372 fa
251 11111011 373 fb
252 11111100 374 fc
253 11111101 375 fd
254 11111110 376 fe
255 11111111 377 ff
Explanation / Answer
please rate - thanks you said 1 to 256 but showed 0 to 255 this what you're looking for? #include #include using namespace std; int main() { int i,j,num,n=2,number,answer[8]; coutRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.