WEite a program that does the following: Reads from a file 10 integers (one per line) - file name Integers.dat Squares each of the integers. Adds the 10 integers together Adds the squares of the...


WEite a program that does the following:<br>Reads from a file 10 integers (one per line) - file name Integers.dat<br>Squares each of the integers.<br>Adds the 10 integers together<br>Adds the squares of the integers together<br>Writes each of the integers and its sum into a file called<br>'SumofSquares.dat'<br>The last line of the file should contain the total of all the integers<br>and the total of all of the squares of all of the integers.<br>Example of the input file (use any integers you prefer):<br>12<br>223<br>a, = 12<br>54<br>90<br>67<br>543<br>Example of the output file:<br>ー の<br>144<br>16<br>49729<br>5776<br>2916<br>8100<br>4489<br>294849<br>Integer total =<br>Squares total<br>1073<br>366029<br>!!<br>(4275 9651 3<br>

Extracted text: WEite a program that does the following: Reads from a file 10 integers (one per line) - file name Integers.dat Squares each of the integers. Adds the 10 integers together Adds the squares of the integers together Writes each of the integers and its sum into a file called 'SumofSquares.dat' The last line of the file should contain the total of all the integers and the total of all of the squares of all of the integers. Example of the input file (use any integers you prefer): 12 223 a, = 12 54 90 67 543 Example of the output file: ー の 144 16 49729 5776 2916 8100 4489 294849 Integer total = Squares total 1073 366029 !! (4275 9651 3

Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here