Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstring>
- #include "Angestellte.h"
- using namespace std;
- int main()
- {
- //1.)
- Angestellte A;
- strcpy( A.name, "Peter" ) ;
- A.gehalt = 38.000;
- A.geburtsjahr = 1956;
- A.setEintrittsjahr(1978);
- cout << A.getEintrittsjahr()<<endl;
- //2.)
- unsigned int n= 1;
- unsigned int j;
- Angestellte kartei[n];
- for(int i=0;i<n;i++){
- cout<<"Geben Sie die Daten fuer eine(n) Angestellte(n) ein:"<<endl;
- cout<<"Name: ";
- cin>>kartei[i].name;
- cout <<"Geburtsjahr : ";
- cin>>kartei[i].geburtsjahr;
- cout<<"Gehalt: ";
- cin >>kartei[i].gehalt;
- cout<<"Urlaubstage: ";
- cin>>kartei[i].urlaubstage;
- cout<<"Eintrittsjahr: ";
- unsigned int j;
- cin>>j;
- kartei[i].setEintrittsjahr(j);
- }
- for(int i=0;i<n;i++){
- unsigned int jubi=kartei[i].jubilaeum(2016);
- if(jubi!=0){
- cout<<kartei[i].name<<"\t"<<jubi<<" Jahre"<<endl;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement