Create a class asking for the details of the employee as in - name, employee id, designation. Calculate its salary of this month by asking the no of days present in the institute and use display method to display all the details. in c++
Answers
Answered by
5
Answer:
#include <stdio.h>
int main() {
char id[10];
int hour;
double value, salary;
printf("Input the Employees ID(Max. 10 chars): ");
scanf("%s", &id);
printf("\nInput the working hrs: ");
scanf("%d", &hour);
printf("\nSalary amount/hr: ");
scanf("%lf", &value);
salary = value * hour;
printf("\nEmployees ID = %s\nSalary = U$ %.2lf\n", id,salary);
return 0;
}
Similar questions