/*Anil's basic salary is entered through the keyboard. His dearness allowance is 38% of basic salary, and house rent allowance is 20% of basic salary. Code a C program to find out his gross salary. coded for kodes4u.blogspot.com*/
#include
#include
void main()
{
float basic_salary,dearness_allow,house_rent,gross_salary;
clrscr();
printf("\Enter the basic salary of Anil:");
scanf("%f",&basic_salary);
dearness_allow=0.38*basic_salary;
house_rent=0.20*basic_salary;
gross_salary=basic_salary+dearness_allow+house_rent;
printf("\nAnil's gross salary is :%f",gross_salary);
getch();
}
No comments:
Post a Comment