How to turn a while loop into a do while loop?
<p>I have this:</p>

<pre><code>#include &lt;iostream&gt;

using namespace std;

int main()
{
  char ch, max = 0;
  int n = 0;
  cout &lt;&lt; "Enter number of characters! :";
  cin &gt;&gt; n;
  cout &lt;&lt; "Enter the number";
  while (n&gt;0)
  {
      cin &gt;&gt; ch;
      if(max&lt;ch)
          max = ch;
      n=n-1;

  }
  cout &lt;&lt; "max is : " &lt;&lt; max;
}
</code></pre>

<p>I'm trying to turn it into a do while loop - here's what I have:</p>

<pre><code>int main()
{
char ch, max = 0;
int n = 0;
cout &lt;&lt; "enter character";
cin &gt;&gt; n;
cout &lt;&lt; "enter two";
cin &gt;&gt; ch;
do
      (max&lt;ch);

while
(max = ch);
(n&gt;0);
n= n - 1;

      cout &lt;&lt; "max is : " &lt;&lt; max;
}
</code></pre>

<p>How do I fix this?</p>
