lease continue tthe code below --- #include

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter13: Overloading And Templates
Section: Chapter Questions
Problem 8PE
icon
Related questions
icon
Concept explainers
Question

Please continue tthe code below

---

#include <stdio.h>

struct Employee

{  

    // declaring the members of the structure  
    char emp_full_name[30];  
    int pos;  
    float rate_per_hour;
    int hour_worked;
    float deduction;
    float gross_week_pay;
    float net_week_pay;
};  


int main()  

{  
    struct Employee var; // declare the Employee variable  
    struct Employee *ptr; // create a pointer variable (*ptr)  
    ptr = &var ;// assigning the address of var to pointer type variable
    return 0;
}
D. Get five (5) employees' names, positions, rates per hour, hours worked in a week, and total
deductions. Compute the week's gross and net pay of each of the 5 employees. Gross pay is the
product of the hours worked in a week and the rate per hour. The net pay is the difference
between gross pay and total deductions.
E. Using the pointer variable and the membership operators (. and ->), assign the values inputted
and the result of the computations to the structure variable. Print the employees' week payroll
details.
Transcribed Image Text:D. Get five (5) employees' names, positions, rates per hour, hours worked in a week, and total deductions. Compute the week's gross and net pay of each of the 5 employees. Gross pay is the product of the hours worked in a week and the rate per hour. The net pay is the difference between gross pay and total deductions. E. Using the pointer variable and the membership operators (. and ->), assign the values inputted and the result of the computations to the structure variable. Print the employees' week payroll details.
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Control Structure
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr