J
joy_julia446
Hi there,
I would like to print my result as below in an output file. I would
appreciate if someone can give me some advice.
RESULT
ClassA,96.678,88.196,8.048,-0.233,456.231,5.890, 1
11.371,-0.906,-0.025,9999.888,76.888,0.001,3456.899 2
20.422,-20.979,0.422,4567.987,987.987,0.985,0.445, 3
-0.044,0.905,1.335,890.987,34.567,32.235,76.874; 4
let say the results are stored in an arry:
a[0] = 96.678, a[1] = 88.196, a[2] = 8.048, a[3] = -0.233, a[4] =
11.371, a[5] = -0.906, .........a[26] = 76.874.
The max column for each line that I can print is 51. Once it reach 51,
I need to start the next row.
The figure on the far right side ie. 1 2 3 and 4 represents the row
number and have to be printed at column 54th.
My query:
1.How am I suppose to keep track the number of row that I have printed?
for example, I have used 48columns in row1. Since 11.371 occupies
6spaces, I need to start the new line.
2. How do fix the row number at column 54th?
Please kindly note that the size of the array can be as large as
thousand. In this case, I try to simplify my problem here.
Thank you
I would like to print my result as below in an output file. I would
appreciate if someone can give me some advice.
RESULT
ClassA,96.678,88.196,8.048,-0.233,456.231,5.890, 1
11.371,-0.906,-0.025,9999.888,76.888,0.001,3456.899 2
20.422,-20.979,0.422,4567.987,987.987,0.985,0.445, 3
-0.044,0.905,1.335,890.987,34.567,32.235,76.874; 4
let say the results are stored in an arry:
a[0] = 96.678, a[1] = 88.196, a[2] = 8.048, a[3] = -0.233, a[4] =
11.371, a[5] = -0.906, .........a[26] = 76.874.
The max column for each line that I can print is 51. Once it reach 51,
I need to start the next row.
The figure on the far right side ie. 1 2 3 and 4 represents the row
number and have to be printed at column 54th.
My query:
1.How am I suppose to keep track the number of row that I have printed?
for example, I have used 48columns in row1. Since 11.371 occupies
6spaces, I need to start the new line.
2. How do fix the row number at column 54th?
Please kindly note that the size of the array can be as large as
thousand. In this case, I try to simplify my problem here.
Thank you