/* This program takes basic salary from
user, calculates dearness and house rent
allowances and then gross salary and
shows results.*/
#include<stdio.h>
#include<conio.h>
int main ()
{
/*declaring veriables*/
float bsalary, dallow, hrallow, grsalary;
/*prompt to take bsalary as input*/
printf("Please enter the basic salery: ");
/*taking input*/
scanf("%f",&bsalary);
/*calculations*/
dallow =
0.4* bsalary;
hrallow =
0.2 * bsalary;
grsalary
= bsalary + dallow + hrallow;
/*showing results*/
printf("\n\nBasic Salary : %f Rs\n",bsalary);
printf("\nDearness Allownce :
%f Rs \n",dallow);
printf("\nHouse Rant Allownce :
%f Rs \n",hrallow);
printf("___________________________________________\n");
printf("\nGross Salary : %f Rs\n",grsalary);
getche();
return 0;
}
Nice Dude Have Professional Writing Style, g8
ReplyDeleteVisit My Blog
There are some errors... Such as Salary, Rent and getch()... You have written Salery, Rant and getche... Rant means shouting in anger and salery is meaningless.....
ReplyDeleteits vary nice and simple to write...thanque
ReplyDeleteramesh basic salary is input through the keyboard his derness allowance is 20% of basic salary write a program to calculate his gross salary
ReplyDeletethanks for solve the qustion
ReplyDeleteMore simpler solution for this is
ReplyDeletevoid main()
{
float basic_salary, dearness, house_rent, gross_salary;
clrscr();
printf("Enter the basic salary\n");
scanf("%f", &basic_salary);
dearness=40*basic_salary/100;
house_rent=20*basic_salary/100;
gross_salary=basic_salary+dearness+house_rent;
printf("Gross salary is %f", gross_salary);
getch();
}
The best i can found. thank you. :)
ReplyDeleteVery easy to understand. Thank You.
ReplyDeleteeasy to understand, Thanks
ReplyDeleteIt's very easy code thanks and provide more code....
ReplyDelete(If the string "Alice in wonder land" is fed to the following scanf( ) statement, what
will be the contents of the arrays str1, str2, str3 and str4?
scanf ( "%s%s%s%s%s", str1, str2, str3, str4 ) ;)
Like that.....
Very simple and easy to understand thank you very much
ReplyDeleteThanks for solve the question
ReplyDeleteCasino Hotel Tunica Tickets - JT-Mobile Arena
ReplyDeleteGet 거제 출장안마 the 김포 출장마사지 best deals on Concert at JT-Mobile Arena, featuring popular music, interactive 강원도 출장안마 theater, dining and nightlife. JT-Mobile Arena provides concerts Fri, Dec 17Keith SegalSat, Dec 18Jameson 상주 출장마사지 Rodgers 하남 출장샵