SUNIL GUTTA

SUNIL GUTTA

  • NA
  • 1k
  • 393.9k

Calculation on text-file ?

Nov 13 2013 2:39 AM
Hi

This may be an extension to the above linked post :)


My questions would be . . what if text-file , we are getting and reading content caries i.e 

Scenario 1 : program that will read all the integer numbers and find the smallest, the largest, the sum, and the average values. Sort all numbers read in ascending order and output all results into another file name.

scenario 2 :  program that reads the matrix from the text and output the average value of each row and column, smallest and the biggest number of each row/column. Smallest and biggest number of the whole matrix and the average value of the whole matrix to a text file.

Well input to this is : @in text-file 

60 57 94 8 95 68 13 30 6 62 42 65 82 52 67  
21  95  12  71  1  90  31  38  57  16  90  40  79  35  6  
72  98  95  19  54  23  89  60  5  26  23  6  13  70  38  

Cheers Ty for help 

Answers (1)