You are on page 1of 1

// Ushtrimi 5.Kapitulli i klasave.

Kerkesa e modifikuar:Perfshirja e nje struct


brenda klases.

#include <iostream>
#include <string>
using namespace std;
class E
{
public:
struct X
{
string emri;
double taksa;
double mes;
string dega;
};
int nr_stafit;
X x;
};

int main()
{
E e;
e.x.emri ="Alban";
e.x.taksa=35000;
e.x.mes=9.99;
e.x.dega="Informatike";
e.nr_stafit=58;

E::X x;
x.emri = "John";
cout<< e.x.emri<<endl;
e.x.taksa=35000+25000;
cout<<e.x.taksa<<endl;
if ( e.x.dega=="Informatike"){
cout<< e.x.emri<<" "<<e.x.mes<<endl;
}
cout<<e.nr_stafit;
}

//Alban Bogdani, IE204.

You might also like