Q&A Discussions
#include <iostream>
using namespace std;
class employee
int main()
{
private:
double salary;
public:
void getsalary(double sal)
{
salary=sal;
}
void display()
{
cout<<"the salary:"<<salary;
}
};
void main ()
{
employee programmer;
employee manager;
manager.getsalary (60000.0);
programmer.getsalary(40000.0);
manager.display();
programmer.display();
return 0;
}
1 Vote
5 AnswersРусские помогайте
10 Votes
7 AnswersHot today
How to improve code readability
0 Votes
Functions
1 Votes
App
0 Votes
I NEED to make a game
0 Votes
Grouping data is not working
0 Votes
Please help with the output
0 Votes
Use of flag
0 Votes
Mentor
0 Votes