Untitled

mail@pastecode.io avatar
unknown
plain_text
13 days ago
771 B
1
Indexable
Never
#include <iostream>
using namespace std;
class makina{
    public :
     int viti_prodhimit;
     string pronari;
     string marka;
     float km;
     string shasia;
     char tipi_kamios;
     void ndrysho_pronarin(string emri)
     {
         pronari=emri;
     }
     void ndrysho_km(float km_te_re)
     {
         km=km_te_re;
     }
     void afisho_tipin_e_kamios()
     {
         cout<<"Tipi i kamios eshte "<<tipi_kamios;
     }
     makina(int v, string p,string m,float k, string sh, char t)
     {
         viti_prodhimit=v;
         pronari= p;
         marka=m;
         km = k;
         shasia=sh;
         tipi_kamios=t;
     }
};
int main() {
     makina m1(2010,"Altin","Mercedez-Benz",120000,"A34BXZ",'A');
     cout<<m1.marka<<endl;
    return 0;
}
Leave a Comment