How do i prevent long output from being messed up in codeblocks linux

I was making this C++ programe to see multiplication table and after compiling in codeblocks(linux) the output in xterm was messed up it took me a long time to figure out the code is right and it was xterm resizing that is making this mess.Even used gnome terminal but no use.So what do i do so that long output do not mess up.

Here is the code if you want to see how bad it looks on xterm.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
  #include <iostream>
using namespace std;
int main ()
{
for ( int i = 0; i < 30; i++ )
{
cout << '\t' << i;
}
cout << '\n';
for ( int i = 0; i < 30; ++i )
{
cout << i;
for ( int j = 0; j < 30; ++j )
{
cout << '\t' << i * j;
}
cout << '\n';
}
}
send to a file, there you may scroll as much as you want.
$ ./a.out > output


also, learn to indent.
Topic archived. No new replies allowed.