Hello !!!

Can somedoy please tell me why I'm getting this strange results in my
program:

Please enter the students name: testing
Please enter the students name: Please enter the students name: Please
enter the students name: Please enter the students name: Please enter the
students name:
Please enter the students name: Please enter the students name: Please
enter the students name: Please enter the students name:


and here is the code:

#include <iostream.h>
#include <cctype>
using namespace std;

int main()
{
        int student[10];
        int student_count = 0;
        int count = 0;

        while(count < 10)
        {
                cout << "Please enter the students name: ";
                cin >> student[student_count++];

                count++;
        }

        return 0;
}

I'm getting the same results if I use do while loop. Please help me,
because this is driving me crazy.

                                                                Bye.

                                          //////
      xxxxxx                             ( o o )
      xx  xx           /------------oOO-----O-----OOo------------\
      xx  xx           |           From: Iztok Polanic           |
       xxxx            |  E-mail: [EMAIL PROTECTED]  |
      xx  xx           |      WWW: http://kotzi.home.ml.org      |
     xx    xx          |            http://www.intering.si       |
    xx      xx         \-----------------------------------------/

Reply via email to