A good answer might be:Without the parentheses the second "+" would mean "string concatenation," not addition. |
Input File for Sum ProgramHere is an input file for use with this program. The file is named input.txt. Here is a sample run of the program with this data file:12 7 C:\users\default\JavaLessons>java AddTwo < input.txt Enter first number: Enter second number: Sum: 19 C:\users\default\JavaLessons> Warning: The input file for this program cannot contain any characters that are not part of an integer. The characters must be an optional leading + or - followed by digit characters '0' through '9'. This includes spaces in front of a number. The following input file will not work: 12 7 |
QUESTION 9:What is wrong with the second input file? Click Here after you have answered the question |