URI:
   DIR Return Create A Forum - Home
       ---------------------------------------------------------
       Class Discussion
  HTML https://srm.createaforum.com
       ---------------------------------------------------------
       *****************************************************
   DIR Return to: Programming in C++
       *****************************************************
       #Post#: 76--------------------------------------------------
       MEMBER FUNCTION OUTSIDE THE CLASS
   DIR By: gaurav
       Date: May 21, 2019, 6:22 am
       ---------------------------------------------------------
       MEMBER FUNCTION OUTSIDE THE CLASS
       #include<iostream.h>
       #include<conio.h>
       class average
       {
       public: int English, BS, DS, OS, C, total, avg;
       public: void input();
       void output();
       };
       void average :: input()
       {
       cout<<"Enter the marks for English=";
       cin>>English;
       cout<<"Enter the marks for Basic Statistics=";
       cin>>BS;
       cout<<"Enter the marks for Data Structure=";
       cin>>DS;
       cout<<"Enter the marks for Operating System=";
       cin>>OS;
       cout<<"Enter the marks for Programming in C++=";
       cin>>C;
       total=English+BS+DS+OS+C;
       avg=total/5;
       }
       void average :: output()
       {
       cout<<"\nThe total marks="<<total<<"\n";
       cout<<"Average marks="<<avg<<"\n";
       }
       void main ()
       {
       clrscr();
       average ag;
       ag.input();
       ag.output();
       getch();
       }
       *****************************************************
       Page 1 of 1