+ 12
How can i call grade variable in function sum
class result{ int grade; public: math(){grade= 90;} bio(){grade=95;} sum(){grade of math plus grade of bio } what is the way to sum grades, please??
3 Réponses
+ 7
int sum(int a, int b)
{grade=a;
grade=b;
return(sum of grade );}
+ 7
int bio()
{grade=90;
return grade;}
int math()
{grade=95;
return grade;}
int sum()
{int s=bio()+math();
return s;}
+ 2
The sum should have operations of math and bio its parameters.