Editing C Program

Please find why and fix the problem in this C code where the sum at the end of the file name is not the same as the numerical sum printed to the command line. For example, if sum equals 5034, the file name should be “numbers.5034”.