Advertisement
delvinkrasniqi

VitiLindjes

Apr 19th, 2018
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3.  
  4. using namespace std;
  5.  
  6. class Student
  7. {
  8. private: int Viti_lindjes;
  9. public : string Emri , Mbiemri;
  10.  
  11. int llogaritmoshen();
  12.  
  13. void CaktoMoshen(int vl)
  14. {
  15. Viti_lindjes=vl;
  16. }
  17. int Lexomoshen()
  18. {
  19. return Viti_lindjes;
  20. }
  21. };
  22.  
  23. int Student::llogaritmoshen()
  24. {
  25. return 2018 - Viti_lindjes;
  26. };
  27.  
  28. int main()
  29. {
  30. Student alfa;
  31. alfa.Emri;
  32. alfa.Mbiemri;
  33. alfa.llogaritmoshen();
  34. alfa.CaktoMoshen(1999);
  35.  
  36. cout <<"Emri: " <<alfa.Emri<<endl;
  37. cout<<"Mbiemri: " <<alfa.Mbiemri<<endl;
  38. cout<<"Viti i Lindjes: "<<alfa.Lexomoshen()<<endl;
  39. cout<<"Mosha: "<< alfa.llogaritmoshen();
  40.  
  41. return 0;
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement