Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- class ypalilos{
- private:
- string name;
- float misthos;
- public:
- ypalilos(){
- name="";
- misthos=0;
- }
- void setValues(string n, float m){
- name =n;
- misthos = m;
- }
- };
- int main(){
- ypalilos yp1;
- string n;
- float m;
- cout<<"Dwse to onoma tou ypalilou."<<endl;
- cin>>n;
- cout<<"Dwse ton mistho tou ypalilou."<<endl;
- cin>>m;
- yp1.setValues(n,m);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement