Hello
I am particularly new to programming working on a mathematical analysis where I have to perform some functions on a text file.
I have a text file in this format, it contains 3 numbers in each line of the file and I need to separate each column in different files( or arrays and peform mathematics functions on them to get the solutions I need. Can you help me with the reading and separating part of the code. Thanks
Here is a sample of the file
"myfile.txt "
1 2 3
12 22 345
123 321 897
..... and so on
I want something like A[3] = { 1, 12, 123}
b[3] = {2, 22, 345}
c[3] = {3,345,897}
or 3 columns in 3 separate text files....so that I can read them and perform the mathematical functions.
Thanks for taking time out and helpin me, I am workin on suse linux.
Vinay
I am particularly new to programming working on a mathematical analysis where I have to perform some functions on a text file.
I have a text file in this format, it contains 3 numbers in each line of the file and I need to separate each column in different files( or arrays and peform mathematics functions on them to get the solutions I need. Can you help me with the reading and separating part of the code. Thanks
Here is a sample of the file
"myfile.txt "
1 2 3
12 22 345
123 321 897
..... and so on
I want something like A[3] = { 1, 12, 123}
b[3] = {2, 22, 345}
c[3] = {3,345,897}
or 3 columns in 3 separate text files....so that I can read them and perform the mathematical functions.
Thanks for taking time out and helpin me, I am workin on suse linux.
Vinay
Comment