C# .NET - how to write a simple payroll program in c# for calculating employee salary with da,hra,basicpay

Asked By JAYA PAVITHRAA on 18-Aug-09 01:55 AM
end of post
Santhosh N replied to JAYA PAVITHRAA on 18-Aug-09 02:52 AM

check this thread for few samples and how to work on this..

http://www.daniweb.com/forums/thread115086.html#

i need a simple one with only basic pay,da,hra..m not able to do n csharp as lik c/c++..da=20/100*basicpay;hra=10/100*basicpay;salary=basicpay+da+hra..i need a program only with the above calculation

Asked By JAYA PAVITHRAA on 18-Aug-09 03:22 AM
end of post

Calculating Salary - Kirtan Patel replied to JAYA PAVITHRAA on 23-Aug-09 10:57 AM

Hi Here is What you want :)


#include<stdio.h>

#include<conio.h>

 

void main()

{

 float BasicPay,da,hra;

 

 printf("Enter Basic Pay :\n");

 scanf("%f",&BasicPay);

 da = (0.2)*BasicPay;

 hra = (0.1)*BasicPay;

 

 printf("Salary is := %d",BasicPay+da+hra);

 getch();


}