• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Unix: How can I make a formatted table?

Coldkilla

Diamond Member
I'm trying to make a table in Unix that would prompt a user to add two numbers. Those numbers would be shown at the top of the table, and the the table would consist of: Adding those numbers, subtracting those numbers, mult/dividing those numbers..

And each row would add 5 to the inserted number.

Now I am pretty sure I can do all of that, however, I want my table to be formatted nicely. Would it be easier to build the table row to row? or column to column?

Example:
Num1 --- Num2 --- Adding --- Subtracting --- Multi --- Divide
5 ---------- 6 -----------11 --------- -11 ------------- 30 ------ Whatever that is.
10 -------- 11 --------- 22 ---------- -1 ------------- 110 ------ .90909090
-
How can I have the table automatically have nice spacing between the columns?

Should the code be written:

cout << " Num1 " << " Num2 " << .... and so on, or should it be written in column form? I'm kinda new to Unix and don't know any of the commands.

So.. how can I make this table nice and formatted?
 
Back
Top