Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- class Student
- {
- private: int Viti_lindjes;
- public : string Emri , Mbiemri;
- int llogaritmoshen();
- void CaktoMoshen(int vl)
- {
- Viti_lindjes=vl;
- }
- int Lexomoshen()
- {
- return Viti_lindjes;
- }
- };
- int Student::llogaritmoshen()
- {
- return 2018 - Viti_lindjes;
- };
- int main()
- {
- Student alfa;
- alfa.Emri;
- alfa.Mbiemri;
- alfa.llogaritmoshen();
- alfa.CaktoMoshen(1999);
- cout <<"Emri: " <<alfa.Emri<<endl;
- cout<<"Mbiemri: " <<alfa.Mbiemri<<endl;
- cout<<"Viti i Lindjes: "<<alfa.Lexomoshen()<<endl;
- cout<<"Mosha: "<< alfa.llogaritmoshen();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement