I'm new to c++ and the programming world, I'm currently trying to write a code to find the max and min values and their average and assign the average obtain to a zero within a text file.

Data.txt

110 109 109 109 110 111 112 113 115 112 0

103 101 101 102 103 102 103 105 0 110 111

112 112 0 112 116 116 113 111 111 112 0

Sorry, i can't provide my attempted code, visual crashed and i lost my file. If anyone can assist me, it would be truly grateful. Again, I would like to find the max and min (of each line) and the average of both and assign it to the zero value in each line.

Sorry you lost your code. You just learned the value of "save often". But we're still not going to write it for you. You haven't shown us any effort on your part. Not even pseudo-code. Try again and let us know where you are stuck.

Hmm, strange, my experience is that visual studio in case of say a power failure never looses code, it always nicely and gently recovered it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.