Skip to content

Instantly share code, notes, and snippets.

@siraajul
Created January 15, 2020 18:55
Show Gist options
  • Save siraajul/9269f6d69bf85a25273e73ca579a94a8 to your computer and use it in GitHub Desktop.
Save siraajul/9269f6d69bf85a25273e73ca579a94a8 to your computer and use it in GitHub Desktop.
#include <iostream>
using namespace std;
class employee
{
char name[10];
float salary;
int id;
public:
void get()
{
std::cout<<"Enter the name: ";
std::cin>>name;
std::cout<<"Enter the salary: ";
std::cin>>salary;
std::cout<<"Enter the id: ";
}
void show()
{
std::cout<<name<<endl;
std::cout<<salary<<endl;
std::cout<<id<<endl;
}
};
int main()
{
employee E;
E.get();
E.show();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment