I have this code that outputs ASCII code in columuns. But the order of the numbers comes in rows, 32 34 35 36 37 38 39 40 41 42 43 44 45 46 47 etc. But I want it to output the same numbers but vertical, liket this.
32
33
34
35
etc.
1 2 3 4 5 6 7 8 9 10 11 12 13 14
#include <iostream> // cout
#include <iomanip> // setw
usingnamespace std;
int main ()
{
int a;
for(a=32;a<=255;++a)
{
cout << a << setw(2) << static_cast<char>(a) << setw(20);
}
return 0;
}