WAP to accept basic salary of an employee?
Calculate it HRA=25%,DA=30%,PF=30%&net salary display all
contents?
Answers were Sorted based on User's Feedback
Answer / don
#include<stdio.h>
void main()
{
long int bs,da,hra,pf;
printf("\nEnter The Basic Salary of Employee: ");
scanf("%d",&bs);
printf("\nDA : %d",da=bs*30/100);
printf("\nHRA : %d",hra=bs*25/100);
printf("\nPF : %d",pf=bs*30/100);
printf("\nNet Salary: %d",da+hra+pf);
}
Hey frnds pls tell me is it a ryt answer or wrong?
Help me out
| Is This Answer Correct ? | 49 Yes | 26 No |
Answer / sanjay
IF UR BASIC SALARY 5000 RS.
HRA=B*25/100;
HRA=1250;
DA=BS*30/100;
DA=1500;
PF=BS*30/100;
PF=1500;
NET SALARY=HRA+DA+PF+BS;
NET SALARY=1250+1500+1500+5000;
NET SALARY= 9250 RS.
THIS IS MY CORRECT ANSWER
| Is This Answer Correct ? | 27 Yes | 17 No |
Answer / yarmia anuj kalundia
the program does not yield proper result, cos long int is
used and then only "%d", instead just use "%ld" like i did
in following
"#include<stdio.h>
void main()
{
long int bs,da,hra,pf;
printf("\nEnter The Basic Salary of Employee: ");
scanf("%ld",&bs);
printf("\nDA : %ld",da=bs*30/100);
printf("\nHRA : %ld",hra=bs*25/100);
printf("\nPF : %ld",pf=bs*30/100);
printf("\nNet Salary: %ld",da+hra+pf);
}
| Is This Answer Correct ? | 20 Yes | 17 No |
Answer / salim kumar a.p.
My question is that, my salary is Rs. 12,000/-. In my
salary, How can calculate the Basic, DA, HRA and other
conveyance allowancs. This is for the PF. Please send the
detaisl and examples to me at the earleist. Hope for the
same.
Thanks
Salim Kumar A.P.
| Is This Answer Correct ? | 10 Yes | 10 No |
Answer / brijesh
jst add basic into net salary with da n hra n pf
| Is This Answer Correct ? | 4 Yes | 10 No |
What is the difference between #include and #include 'file' ?
Differentiate between null and void pointers.
which of the following go out of the loopo if expn 2 becoming false a.while(expn 1){...if(expn 2)continue;} b.while(!expn 1){if(expn 2)continue;...} c.do{..if(expn 1)continue;..}while(expn 2); d.while(!expn 2){if(expn 1)continue;..}
how to find out the union of two character arrays?
Explain how do you list a file’s date and time?
What is string length in c?
what is the difference between i++ and ++i?
Write a pro-gramme to determine whether the number is even or odd?
Difference between pass by reference and pass by value?
What is the sizeof () operator?
Can a pointer be volatile in c?
how will you write a program on linked lists using JAVA programming???????????