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

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

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

Post 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 42 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
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply