Employee program using nested structures in c++
- Get link
- X
- Other Apps
CODE:
#include<iostream>
#include<string>
using namespace std;
struct Employeedata {
string name;
int yearofeducation;
};
struct check {
int experience;
string DOB;
int age;
Employeedata d;
};
int main()
{
check c1;
cout << "ENTER YOUR DATA\nNAME\nDOB\nage\nYEAROFEDUCATION\nEXPERIENCE\n";
cin >> c1.d.name >> c1.DOB>>c1.age >> c1.d.yearofeducation >> c1.experience;
cout << "checking you eligibility......................\n";
if (c1.experience < 2 && c1.d.yearofeducation > 16)
{
cout << "you are FRESH GRADUATE AND YOU ARE ELIGIBLE OF INTERVIEW\n";
}
else if (c1.age>50 && c1.d.yearofeducation < 16)
{
cout << "you are not eligible for post!\n";
}
else if (c1.d.yearofeducation > 18)
{
cout << "you are eligible for managerial position\n";
}
else
{
cout << "pls enter valid answer\n";
}
}
- Get link
- X
- Other Apps
Comments
Post a Comment