A
A
Alexander Timkov2019-03-15 12:31:25
C++ / C#
Alexander Timkov, 2019-03-15 12:31:25

How to display data in a table with 4 columns?

There is a program https://pastebin.com/qbKHgbgP
This task needs to be output to the data in this form (Now the program displays everything in 2 columns)
A 123 a 1234
B 123 b 1234
C 123 c 1234
..

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
res2001, 2019-03-15
@Tumkas

for (char I = 'A', i = 'a'; I <= 'Z'; ++I, ++i) {
        cout << setw(54) << " | " << setw(4) << I << " | " << setw(13) << static_cast<int>(I) << " | ";
        cout << setw(4) << i << " | " << setw(13) << static_cast<int>(i) << " | " << endl;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question