//miniloops.cpp

#include<iostream>

using namespace std;

int main() {

        int i, j;
        int product = 1;
        int multcounter = 0;
        int domultcounter = 0;
        int newmultcounter = 0;

// first loop: do-while multiplies 1-10, answer should be 3628800
        j = 10;
        do
        {
                product = product * j;
                //cout << "product " << product << endl;
                domultcounter++;
                j = j - 1;
                //cout << "j " << j << endl;
        } while (j > 0);

       cout << endl;
       cout << "the product is " << product << endl;
       cout << "the domultcounter is " << domultcounter << endl << endl;

// second loop: while 10 -> 1
        product = 1;
        j = 10;
        while (j > 0)
        {
                product = product * j;
                //cout << "product " << product << endl;
                multcounter++;
                j = j - 1;
                //cout << "j " << j << endl;
        }      

        cout << "the product is " << product << endl;
        cout << "the multcounter is " << multcounter << endl << endl;

// third loop: while 1 -> 10
        product = 1;
        j = 1;
        while (j <= 10)
        {
                product = product * j;
                //cout << "product " << product << endl;
                newmultcounter++;
                j = j + 1;
                //cout << "j " << j << endl;
        }

        cout << "the product is " << product << endl;
        cout << "the newmultcounter is " << newmultcounter << endl << endl;

        return 0;
}