Use the following int array int [ ] numbers = { 42, 28, 36, 72, 17, 25, 81, 65, 23, 58 } -Open file data.txt to write. -

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Use the following int array int [ ] numbers = { 42, 28, 36, 72, 17, 25, 81, 65, 23, 58 } -Open file data.txt to write. -

Post by answerhappygod »

Use the following int array
int [ ] numbers = { 42, 28, 36, 72,17, 25, 81, 65, 23, 58 }
-Open file data.txt to write.
-then provide the code to write thevalues of the array numbers to the file with the
following format. You must accessthe elements of the array numbers to get the values
-Remember to close the file
Numbers at index 0 = 42
Numbers at index 1 = 28
Numbers at index 2 = 36
Numbers at index 3 = 72
Numbers at index 4 = 17
Numbers at index 5 = 25
Numbers at index 6 = 81
Numbers at index 7 = 65
Numbers at index 8 = 23
Numbers at index 9 = 58
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply