daily pastebin goal
61%
SHARE
TWEET

Untitled

Ashik_01 May 16th, 2018 97 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <bits/stdc++.h>
  2.  
  3.  
  4. using namespace std;
  5.  
  6. class ashik
  7. {
  8.     int fee;
  9.     char name[10], course[10];
  10.  
  11.     public:
  12.  
  13.     ashik(char name[10], char course[10])
  14.     {
  15.         strcpy(this->name , name);
  16.         strcpy(this->course, course);
  17.         fee = 0;
  18.     }
  19.  
  20.     ashik(char name[10], char course[10], int fee)
  21.     {
  22.         ashik :: ashik(name, course);
  23.             this->fee = fee;
  24.     }
  25.  
  26.     void display()
  27.     {
  28.         cout << name << endl << course << endl << fee<< endl;
  29.     }
  30. };
  31.  
  32.  
  33.  
  34. int main()
  35. {
  36.     ashik a1("ASHIK", "C++");
  37.     ashik a2("ARISHA", "JAVA", 1000);
  38.  
  39.     a1.display();
  40.     a2.display();
  41.  
  42.   return 0;
  43. }
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