dont use system() . If you want to hold the display screen, better use cin.get();
the way I suggested it, you wouldnt need an if-else block. Rather than user choosing which 2 to keep as is, let...
Type: Posts; User: R41D3N
dont use system() . If you want to hold the display screen, better use cin.get();
the way I suggested it, you wouldnt need an if-else block. Rather than user choosing which 2 to keep as is, let...
just tell the user to enter the element he wants to switch with the average ... lets say x(0/1/2)
then your lhs would become
a[x] = ....
You could work vectors the same way, if thats...
I guess he means something like:
#include <iostream>
#include <vector>
And nop that wouldnt be necessary, since its just 3(size fixed) values. You might as well use an array of size 3.