- 2
Please help me to solve this struct program of c++ question on description
Describe a structure to contain the employee details such as employee code,name,designation , basic pay, HRA , DA and PF. Write a program to display the details employee code,name ,gross salary and net salary for 3 employees individually. ( gross salary = basic salary + HRA + DA + PF and net salary = gross salary - PF )
1 Antwort
+ 1
Your struct will include the needed fields listed in your assignment. Name the struct variables to match the assignment fields. Determine what type of data will be stored in each field. Declare the struct variables with appropriate data types. In the main program create an array of your struct or allocate it dynamically. Initialize the structs with hard-coded data, or user prompts, or read the data from a file or database. For the three employees, calculate gross salary and net salary. Print the results.