Answer to Question #54397 in C for rajashree g.s

Question #54397
write a program which takes name,basic,daper,bonper and loandet for a employee. calculate the salary using the following relation.
salary=basic+basic*daper/100+bonper*basic/100-loandet.

data is
name=MARK,basic=2500,daper=55,bonper=33.33,loandet=250.00
calculate salary and then print the result under the following headings
(salary to be printed to the nearest dollars)
name basic salary
1
Expert's answer
2015-09-04T03:03:17-0400
#include<stdio.h>
main()
{
char fname[4] = "MARK";
int basic = 2500;
int daper = 50;
float bonper = 250.00;
float loandet = 250.00;
double salary = 0;
salary = basic + basic * daper/100 + bonper*basic/100 - loandet;
printf(" %s salary = %6.2f $ ",fname,salary);
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS