		#include <iostream>
		#include <conio.h>
		using namespace std;
		int main()
	    {
		    int  aCount, bCount, cCount, dCount, n;
		    char  grade;
		    aCount = bCount = cCount = dCount = n = 0;
		    do
	      {
		      cout<<"  Enter grade (Q for Quit) :";
	      cin>>grade ;
		      n ++;
		      if (grade == 'A') aCount ++;
		      else if (grade == 'B')  bCount ++;
		      else if (grade == 'C')  cCount ++;
		      else if (grade == 'D')  dCount ++;
		      else if (grade == 'Q')  n --;
		      else  {
		      cout<<" Wrong grade, try again.\n";
		      n --;
		       }
		     }
	      while (grade != 'Q' ) ;
		    cout<<" Statistics :\n";
		    cout<<" Grade A : "<<float(aCount)/float(n)<<"percent\n";
		    cout<<" Grade B : "<< float(bCount)/float(n)<<" percent\n";
		    cout<<" Grade C : "<<float(cCount)/float(n) <<"percent\n";
		    cout<<" Grade D : "<<float(dCount)/float(n)<<"percent\n";
		    return 0;
	   }
