Question:
Write the output of the following C++ program code:
Note: Assume all the required header files are already being included in the program.
class Calc
{
char Grade;
int Bonus;
public:
Calc(){Grade='E' ; Bonus=0;}
void Down(int G)
{
Grade-=G;
}
Void Up(int G)
{
Grade+=G;
Bonus++;
}
void Show()
{
cout<<Grade<<"#"<<Bonus<<end1;
}
};
void main()
{
Calc c;
C.Down(2);
C.Show();
C.Up(7);
C.Show();
C.Down(2)
C.Show();
}
C. Sir| Created: 4-Jan-2019 | Updated: 22-Mar-2026|CBSE12D-2015
