Discuss Programming in Java.

1. Read a file that shows an upper bound on each record. Write a program that reads a record in the file and then shows integers in a range from 1 to that number that is the upper bound that are divisible by 2, the sum of those integers, and the number and sum of those integers not divisible by 2. We also want to see the same data where the upper number is divisible by 3. A sample output may look like this: The following results are based on the the first record in the file which is: 10 There are 5 numbers divisible by 2. The sum of the numbers divisible by 2 is 30. Those numbers are 2 4 6 8 10 There are 5 numbers not divisible by 2. The sum of the numbers not divisible by 2 is 25. Those numbers are 1 3 5 7 9 The following results are based on the the first record in the file which is: 10 There are 3 numbers divisible by 3. The sum of the numbers divisible by 3 is 18. Those numbers are 3,6, 9. There are 7 numbers not divisible by 3. The sum of the numbers not divisible by 3 is 37. Those numbers are 1 2 4 5 7 8 10 The file mentioned is named “divisible” the content is the folder is as follows 10 3 27 31 25

Latest Assignment