Write a program in c++ that display the ASCII chart. Display the numeric value a
ID: 3714683 • Letter: W
Question
Write a program in c++ that display the ASCII chart. Display the numeric value as well as the character so that there are four columns and as many rows as it takes.
a program that displays something like this. thanks!
32 20 040 Space! 64 40 100 @ @ | 96 60 ?40 G#96; 33 21 041 ! ! 34 22 042 " rr 35 23 043 # # 36 24 044 $ 37 25 045 % 38 26 046 & G 39 27 047 ' 40 28 050 ( ( 41 29 051 ) ) 42 2A 052 *? 43 2B 053 +: + 44 2C 054 , , 45 2D 055 - ; 46 2E 056 . 68 44 104 D 1100 64 144 d d 72 48 110 H H 1104 68 150 h h 76 4C 114 L L 1108 6C 154 l ï 77 4D 115 M M 1109 6D 155 m m 48 30 060 0 ; 49 31 061 1 50 32 062 2 51 33 063 3: 52 34 064 4 53 35 065 5 54 36 066 6 55 37 067 55; 56 38 070 8 57 39 071 9: 80 50 120 P P |??2 70 ï60 p p 81 51 121 Q Q |113 71 161 q ? 82 52 122 R R |114 72 162 r r 83 53 123 S S |??5 73 163 s s 84 54 124 T T |116 74 164 t t 85 55 125 U U 1117 75 165 u u 86 56 126 V V |??8 76 166 v v 87 57 127 W w 1119 77 167 w w 88 58 130 88; X 1120 78 170 x x 89 59 131 Y Y |?21 79 171 y Y 90 5A 132 Z Z 1122 7A 172 z z 91 5B 133 [ [ 1123 7B 173 { { 92 5C 134 |124 7C 174 | 93 5D 135 ] ] |125 7D 175 } } 94 5E 136 ^ ^ |126 7E 176 ~ 95 5F 137 _ |127 7F 177 DEL 62 3E 076 > > 63 3F 077 ?: ? 34567012345670123456701234567 44444555555556666666677777777 666666666666666677777777777 01234567012345670123456701234567 DEF 44455555555556666 34567012345670123456701234567 44444555555556666666677777777 DEFExplanation / Answer
#include<iostream>
using namespace std;
int main()
{
int i=0;
char c;
cout<<"Decimal Html Chr ";
//printing Ascii table
while(i<128)
{
c=(char)i;
//printing values...dec and char...
cout<<" "<<i<<" &#"<<i<<" "<<c<<" ";
i++;
}
}
output:
Decimal Html Chr
0 �
1 
2 
3 
4 
5 
6 
7 
8 
9 	
10 

11 
12 
13 
14 
15 
16 
17 
18 
19 
20 
21 
22 
23 
24 
25 
26 
27 
28 
29 
30 
31 
32  
33 ! !
34 " "
35 # #
36 $ $
37 % %
38 & &
39 ' '
40 ( (
41 ) )
42 * *
43 + +
44 , ,
45 - -
46 . .
47 / /
48 0 0
49 1 1
50 2 2
51 3 3
52 4 4
53 5 5
54 6 6
55 7 7
56 8 8
57 9 9
58 : :
59 ; ;
60 < <
61 = =
62 > >
63 ? ?
64 @ @
65 A A
66 B B
67 C C
68 D D
69 E E
70 F F
71 G G
72 H H
73 I I
74 J J
75 K K
76 L L
77 M M
78 N N
79 O O
80 P P
81 Q Q
82 R R
83 S S
84 T T
85 U U
86 V V
87 W W
88 X X
89 Y Y
90 Z Z
91 [ [
92 \
93 ] ]
94 ^ ^
95 _ _
96 ` `
97 a a
98 b b
99 c c
100 d d
101 e e
102 f f
103 g g
104 h h
105 i i
106 j j
107 k k
108 l l
109 m m
110 n n
111 o o
112 p p
113 q q
114 r r
115 s s
116 t t
117 u u
118 v v
119 w w
120 x x
121 y y
122 z z
123 { {
124 | |
125 } }
126 ~ ~
127 
Process exited normally.
Press any key to continue . . .
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.