Wednesday, 2 May 2012


Program given in the class on 2 may 2012
class Applicant                                       // class decription
{ long Ano;
char Name[20];
float Agg;
char Grade;
void Grademe();
public:
void Enter();
void Result();     };

void  Applicant :: Grademe()                    // function to set the grade
{ if (Agg>=80)
Grade=’A’;
else if (Agg>=65 && Agg<80)
Grade=’B’;
else if(Agg>=50 && Agg<65)
Grade=’C’;
else
Grade=’D’; }

void Applicant:: Enter()                           // function to input values
{cout<<”enter the Admission no, name and aggregate marks for the student\n”;
cin>>ANo>>Name>>Agg; }

void Applicant :: Result ()                       // function to display values
{  cout<<”ANo, Name, Aggreagate marks and Grade of the Student is as”;
cout<<”\n”<<Ano<<”\n”<<Name<<”\n”<<Agg<<”\n”<<Grade; }

Tuesday, 29 November 2011