01E-2016
CBSE12D-2016
Problem Statement - 01E
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(); }
Solution
CSKC| Created: 4-Jan-2019 | Updated: 5-Jan-2019|CBSE12D-2015