Dec 2, 2012 at 10:34pm UTC
i need to read a file from notpad and calcutate a two dimentional array
Total Average
________________________________________________________________________________________
1 8 5 2 4 1 1 1 3 ?? ??
2 5 7 2 2 3 4 3 1 ?? ??
3 5 1 1 0 0 0 5 5 ?? ??
4 2 3 2 1 2 2 2 3 ?? ??
5 7 2 0 0 0 1 4 1 ?? ??
6 2 2 2 2 3 4 3 2 ?? ??
7 2 1 2 3 3 1 2 1 ?? ??
8 5 8 1 1 2 1 2 1 ?? ??
9 4 8 2 1 1 2 3 2 ?? ??
10 1 4 4 4 2 4 2 4 ?? ??
__________________________________________________________________________
Total ?? ?? ?? ?? ?? ?? ?? ?? ?? ??
Average ?? ?? ?? ?? ?? ?? ?? ?? ?? ??
it would be each row total and average
each column total and average
i seek idea where to start
Dec 3, 2012 at 4:58am UTC
you can use the getline function to read each line, then store each line into the array.
Dec 6, 2012 at 8:09pm UTC
how can i do
the first row....sum & average, the first colum...sum & average
the second row..sum & average,the secend column..sum & average
third row...sum,third..column..sum
---------- -----------
----------- -----------
----------- -----------
----------- -----------