Page 1 of 1

Q#3. Create a structure that has employee information. struct Employee { int empID; string empName; int joiningYear; int

Posted: Wed Apr 27, 2022 3:52 pm
by answerhappygod
Q 3 Create A Structure That Has Employee Information Struct Employee Int Empid String Empname Int Joiningyear Int 1
Q 3 Create A Structure That Has Employee Information Struct Employee Int Empid String Empname Int Joiningyear Int 1 (40.9 KiB) Viewed 43 times
Q#3. Create a structure that has employee information. struct Employee { int empID; string empName; int joiningYear; int joiningMonth; int joiningDay; }; Input all the Employee Details. Perform Input Validation: • Make sure the month, day, year is consistent i.e. • Year (Should be positive, Can't exceed the current year) Month (Should be positive, should be less than 13) Day (Should be positive, Assume all month have maximum 30 days) In case of error display an Error message and ask the user to renter the information. Sample R Enter Employee ID : 100 Enter Employee Name : Tony Enter Joining Year : 2e2e Error ! Enter a Valid Year Enter Joining Year : 2018 Enter Joining month : 13 Error ! Enter a valid Month Enter Joining month : 3 Enter Joining Day : 34 Error ! Enter a Valid Day Enter Joining month : 30 Employee Report Employee ID : 100 Employee Name : Tony Date of Joining : 30-March-2018