C++ problem

#include
using namespace std;
main()
{
char yn=0;
cout << "###### header######";
cout << " BODY ";
cout <<" "<<" "<< "Do you want to continue (y/n): ";
cin >> yn;
if ( yn == 'y' || yn =='Y' )
{
main();
}
}
here is a program which is written by my friend. Now the problem he is facing is that he dont want to display the (###### header######) part to display again. It shloud display just one time. Please give solution for this thnx

Use a static or a global boolean variable and set it to true on first iteration. Only cout the header if it is false.

sorry i couldn't get your point in your c++ code , that how could you not able to find solutions for your iteration problem .lot and lots of practice need to be done . so be ready to become a good programmer by asking not your problem here but by yourself first again and again.

the solution is in do while loop....