Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
Trending News
NEED JAVA COMPUTER PROGRAMMING HELP?
Write a program that reads a text file that contains groups of integers that start with the word "next". For each group, the program computes and writes out the sum of integers in that group. There may be any number of groups. Example data set:
next
12 45
92 -12 31
next
42 51 275 82 -274
-1 0 26 365
-56
72
next
90 93 91 95
97 96 98
For this data the program writes:
Sum of group 1 is 168
Sum of group 2 is 582
Sum of group 3 is 660
Here is another set of data:
next
1 1 1 1 1 1
next
next
1 1 1 1 1 1 1 1 1
next
10 11
12 13
7 8
9
For this data the program writes:
Sum of group 1 is 6
Group 2 contains no data
Sum of group 3 is 9
Sum of group 4 is 70
The logic of this program is quite tricky.
CAN SOMEONE PLEASE WRITE OUT THIS PROGRAM
1 Answer
- godfatherofsoulLv 78 years agoFavorite Answer
This forum is for helping people, not doing assignments for people.