For Business
Login
Home
Assessments
Mytat Certificates
Community
Courses
Premium Courses
jobs
Practice
Upskilling
Projects
Help
Run ยป
#include
using namespace std; class Employee { private: int salary; public: void setSalary(int s) { salary = s; } int getSalary() { return salary; } }; int main() { Employee myObj; myObj.setSalary(50000); cout << myObj.getSalary(); return 0; }