Return to site

File input in java for mac

broken image
broken image
broken image

Output: A single number which is the sum of all the numbers on the main diagonals of all the given puzzles.įollowing is the code I wrote:( Is the logic correct? Why doesit not produce desired output?) import Next N*9 lines would contain the puzzles in the specified format.

broken image

Input: The first line of input would consist of a number N, the number of 9*9 matrix.