daily pastebin goal
78%
SHARE
TWEET

Untitled

a guest Jan 20th, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. using namespace std;
  3. class student
  4. {
  5.   private:
  6.   int rollno;
  7.   char name [25];
  8.   int marks [3];
  9.   public:
  10.   void setdata (int r .char*n,int m[]);
  11.   void display();
  12.   int per();
  13. };
  14. inline void student ::setdata(int r;char*n,int m[])
  15. {
  16.   rollno=r;
  17.  strcpy(name,n);
  18.  marks[0]=m[0];
  19.  marks[1]=m[1];
  20.  marks[2]=m[2];
  21.  
  22. }
  23. inline void student:: display()
  24. {
  25.   cout<<rollno;
  26.   cou<<name;
  27.   for (i=0;i<3;i++)
  28.   cout<<mout[i];
  29. }
  30.  
  31. int main()
  32. {
  33.   student s;
  34.   int r; char[25];intm[3];
  35.   cin>>r;
  36.   cin>>n;
  37.   for (i=0;i<3;i++)
  38.   {
  39.     cin>>m[i];
  40.   }
  41.   s.setdata(r,n,m);
  42.   s.display();
  43.   s.per()
  44.   }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top