Hi everybody,

I need a little help in my university assignment of C++ Programming.
I have to make a programme which should takes 10 inputs of grades and will count the total no of 'A' grades and 'B' grades and shows the result.
Inputs would be taken as character 'A' and 'B' only and using while or do/while loop.
This is my code.

Code:
/*tnos = total no of students
   grad = grades
   ga = total of grades a
   gb = total of grades b*/

#include <iostream.h>
using namespace std;
int main()
{
      char grad;
      int tnos, ga, gb;
      tnos = 1;
      ga = 0;
      gb = 0;
      do
      {
                 cout<<"Enter the Grade of Student "<<tnos<<" :";
                 cin>>grad;
                 if(grad=='a')
                 {
                         ga=ga+1;
                         tnos=tnos+1;
                         }
                 else if(grad=='b')
                 {
                              gb=gb+1;
                              tnos=tnos+1;
                              }
                 else
                 {
                     cout<<"Please enter only gra A or B:";
                     }
                     }
                     while(tnos<=10):
                     {
                                     cout<<"Total A grades are : "<<ga;
                                     }                  
                 }
but my code is worked till loop and end after it. i.e. it gets the codes right but did not shows any result and close the cmd windows.

Please help me urgently today is the last date od submission. I found this forum after a long search so please help.

Thanx to all