do while loop

Print the sequence using do while loop.
1
2
3
4
* * * *
  * * * *
* * * *
  * * * *

What do you have so far?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <iostream>

  using std::cout;
  using std::endl;

  int main()
  {
     int count = 1; 

     while ( count <= 4 ) 
     {
        // output line of text
        cout << ( count % 2 ? "****" : " ****" ) << endl;
        count++; // increment count
     } // end while

 return 0;
} 

figured it out. Thanks for reply.
Congrats.
That's not a do-while loop, though.
Topic archived. No new replies allowed.