WAP to accept basic salary of an employee?
Calculate it HRA=25%,DA=30%,PF=30%&net salary display all
contents?
Answer Posted / 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 |
Post New Answer View All Answers
What is break in c?
what is diffrence between linear and binary search in array respect to operators?what kind of operator can be used in both seach methods?
In this assignment you are asked to write a multithreaded program to find the duplicates in an array of 10 million integers. The integers are between -5000,000 to 5000,000 and are generated randomly. Use 10 threads, each thread works on 1000,000 integers. Compare the time needed to accomplish the task with single thread of execution program. Do not include the time to fill the array with integers in the execution time.
How can I list all of the predefined identifiers?
How can my program discover the complete pathname to the executable from which it was invoked?
When is a “switch” statement preferable over an “if” statement?
What is a #include preprocessor?
Can you tell me how to check whether a linked list is circular?
What is a good way to implement complex numbers in c?
What does the function toupper() do?
What are the key features in c programming language?
Is struct oop?
What does malloc () calloc () realloc () free () do?
Explain what is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?
What is indirection? How many levels of pointers can you have?