Printing a table!

Hi guys! Here is the deal: I have some data stored in a float data[][] and each row represents a "math, geography, etc" and each column represents the grades related to the row. So I want to print a table into the console that can show something like this:

Subject | Grade 1 | Grade 2 | Grade 3 |

Math.....|.....95.....|......80.....|....75......|

Help me please!
Last edited on
closed account (48T7M4Gy)
I think you'd need to write a program for that.

#include <iostream> might be the first line. Probly need a cout or two :)
see http://www.cplusplus.com/reference/iomanip/

use iomanip header file.
use setw function.

or

use cout.width(n); n=0,1,2 ...
Topic archived. No new replies allowed.