Write a program to evaluate gross salary for basic type in through keyboard with house rent 30% of basic pay and dearness allowance 50% of basic pay. In Q-BASIC.
Answers
Answer:
float basic_salary, dallowance, house_rent, gross_salary;
printf("Enter Basic Salary: ");
scanf("%f",&basic_salary);
dallowance = 0.4 * basic_salary;
house_rent = 0.2 * basic_salary;
gross_salary = basic_salary + dallowance + house_rent;
printf("\n Basic Salary: %.2f", basic_salary);
printf("\n Dearness Allowance: %.2f", dallowance);
printf("\n House Rent: %.2f", house_rent);
printf("\n\n Gross Salary: %.2f", gross_salary);
getch();
return (0);
}
Output:
Enter Basic Salary: 1250.50
Basic Salary: 1250.50
Dearness Allowance: 500.20
House Rent: 250.10
Gross Salary: 2000.80
Share this:
Related
18-Write a C program to calculate the gross salary of an employee.
17-Write a C program to calculate the salary with bonus.
Q1 If a five-digit number is input through the keyboard , write a c program to calculate the sum of its digits.
Next Read: Database Management System 2018 MCA 4th Sem AKTU »
Let Us CPrograms
Lokesh Kumar: Being EASTER SCIENCE's founder, Lokesh Kumar wants to share his knowledge and ideas. His motive is "We assist you to choose the best", He believes in different thinking.
LEAVE A COMMENT
Related Post
Q6. Write C programs to compare the execution time & compilation time for all the four storage classes variables.
Q5 Write a C program to show the storage, default initial value, scope and life of a external storage class variable.
Q4 Write a C program to show the storage, default initial value, scope and life of a static storage class variable.
Leave a Comment
Contact Us About Us FAQ Terms and Conditions Programming Languages Jobs and Contests
Copyright © 2018 EASTER SCIENCE | View full site
Powered by AMPforWP