Latest Activity In Study Groups

Join Your Study Groups

VU Past Papers, MCQs and More

We non-commercial site working hard since 2009 to facilitate learning Read More. We can't keep up without your support. Donate.


Solution::



#include <iostream>


 


using namespace std;


 


voidmain()


{


            char grade;        //char for storing individual grade;


            int i=1; //counter for while loop


            int Acounter=0; //counter for A grade


           


            while (i<=10)


            {


 


startwhile:


 


                        cout"Please Enter Grade of student "i" :"endl;


                        cin>>grade;


 


                        if (grade=='A')


                        {


                                    Acounter=Acounter+1;


                        }


 


                        else if (grade!='B')


                        {


                                    coutendl"Please Enter 'A' or 'B' grade only!"endlendl;


                                    goto startwhile;


                        }


                        i=i+1;


            }


 


            coutendlendl"Total No. of A Grades: "Acounterendl;


 


            if (Acounter<=2)


            {


                        cout"Your class is Poor!";


            }


 


            else if (Acounter<=7)


            {


                        cout"Your class is Good!";


            }


 


            else if (Acounter<=8)


            {


                        cout"Your class is Brilliant!";


            }


            coutendlendl;


} //bye bye


Views: 604

Replies to This Discussion

mani u did really well.. n thanx m thinking of copying it..... hhehehehe but ofcourse me not.. good idea thanx
please see the attached file pls
Attachments:
one more idea solution
see the attached file pls
Attachments:
one more idea solution
see the attached file pls
Attachments:

RSS

© 2021   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service