write a program that takes an expected input file named "input.txt" of this format: (int),(int),(int) (string) (int),(int),(int) (string) (int),(int),(int) (string) (int),(int),(int) (string)...

1 answer below »

write a program that takes an expected input file named "input.txt" of this format:
(int),(int),(int)
(string)
(int),(int),(int)
(string)
(int),(int),(int)
(string)
(int),(int),(int)
(string)
(int),(int),(int)
(string)



  • There will be a line with exactly three integers, separated by commas with no spaces

  • There will be no trailing comma on the integer lines

  • The next line will be a string. It might be a single word, or it may be an entire phrase or sentence

  • There might be any number of lines, but they will always come in that pattern

  • There will not be any missing lines or values

  • You can count on the integers all being legitimate integer values


Your program should then sum the ints of each line and output the immediately following line's string, that many times, seperated by commas such that:
1,2,3
ham
becomes:
ham,ham,ham,ham,ham,ham



Answered Same DaySep 23, 2022

Answer To: write a program that takes an expected input file named "input.txt" of this format:...

Aditi answered on Sep 24 2022
54 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here