Created
January 15, 2020 18:55
-
-
Save siraajul/9269f6d69bf85a25273e73ca579a94a8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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