#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
main(){
float basic_salary, medical, fuel, house_rent, gross_salary, income_tax, income_tax1, net_salary, net_salary1;
system("color 97");
printf("\n\n------------- SALARY APP -------------------");
printf("\n\n Enter Your Basic Income : Rs. ");
scanf("%f" , &basic_salary);
system("cls");
medical = 50000;
fuel = 10000;
house_rent = 30000;
gross_salary = basic_salary + medical + fuel + house_rent;
income_tax = gross_salary * 5/100;
income_tax1 = basic_salary * 5/100;
net_salary = gross_salary - income_tax;
net_salary1 = basic_salary - income_tax1;
printf("\n\n--------------- SALARY APP -------------------");
printf("\n\n----------------- Details --------------------");
printf("\n\n Your Basic Income : Rs.%.2f" , basic_salary);
if(basic_salary >= 200000){
printf("\n\n Your Medical Allowance: Rs.%.2f" , medical);
printf("\n\n Your Fuel Allowance : Rs.%.2f" , fuel);
printf("\n\n Your House Rent : Rs.%.2f" , house_rent);
printf("\n\n Gross Salary : Rs.%.2f" , gross_salary);
printf("\n\n Income-Tax : Rs.%.2f" , income_tax);
printf("\n\n ----------------------------------------------");
printf("\n Your Net Salary : Rs.%.2f" , net_salary);
printf("\n ----------------------------------------------");
}
else{
printf("\n\n Your Medical Allowance: nil");
printf("\n\n Your Fuel Allowance : nil");
printf("\n\n Your House Rent : nil");
printf("\n\n Gross Salary : Rs.%.2f" , basic_salary);
printf("\n\n Income-Tax : Rs.%.2f" , income_tax1);
printf("\n\n ----------------------------------------------");
printf("\n Your Net Salary : Rs.%.2f" , net_salary1);
printf("\n ----------------------------------------------");
}
getch();
return(0);
}
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.