Read the input numbers were given in a txt file and find out the maximum number, minimum number and the sum of those input numbers were given in that file as output by using C++ Programming in simple way.(File Input and Output mode).
Read the input numbers were given in a txt file and find out the maximum number, minimum number and the sum of those input numbers were given in that file as output by using C++ Programming in simple way.(File Input and Output mode).
We won't solve your homework for you. Try solving it by yourself, and if you get stuck we might help.
Devoted my life to programming...
Read this:
A development process
The basic rule is 'start small, compile and test often'.
The valuable skill to learn is how to break the problem down into manageable steps.
> Read the input numbers were given in a txt file and find out the maximum number, minimum number and the sum of those input numbers were given in that file
So for example
1. You read the numbers and just print what's in the file. There's no point having a text file with 123 in it, if you end up printing 456 or "I'm a banana", because any other code you have will just produce garbage.
2. The program from step 1, with 'print the max'.
3. The program from step 2, with 'print the min'.
Do you see where this is going?
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.