indent preformatted text by 4 spaces
using namespace std;
cout<<“Enter elements :”;
//cout<<"\n “<<a<<” “<<a<<” “<<a<<”\n";
I tried to run this code in eclipse ide and it worked perfectly for me.
But when I tried to run this code in codechef’s ide and submitted this solution for the medel problem,I got wrong answer.I don’t understand where I commited a mistake.Your help is very appreciated.Please pardon the broken english I have used.
The problem is easy, just analyse different test-cases, and you will see that after removing all the medians from a tuple of three numbers, you will be left with the min and max element in the sequence.
Just keep track of the index of min and max, because in the output order matters.
Refer the solution in C.
P.S: Refer to the following guidelines when you post again later.
Suggestions for asking the question on this forum.
- Format your code as the forum software messed it up.
- Give the link to problem which you are trying to solve.
- Explain your source-code in plain english, what idea you are trying to implement, yeah we can go through your code but it will be time consuming, it would be better if you explain it.
After doing the above things, then you can expect help from the community.
Thanks for Reading