Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is break in c?

1053


what is diffrence between linear and binary search in array respect to operators?what kind of operator can be used in both seach methods?

1868


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.

3131


How can I list all of the predefined identifiers?

986


How can my program discover the complete pathname to the executable from which it was invoked?

1083


When is a “switch” statement preferable over an “if” statement?

1161


What is a #include preprocessor?

1163


Can you tell me how to check whether a linked list is circular?

1434


What is a good way to implement complex numbers in c?

1055


What does the function toupper() do?

1140


What are the key features in c programming language?

1080


Is struct oop?

1018


What does malloc () calloc () realloc () free () do?

1071


Explain what is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?

1102


What is indirection? How many levels of pointers can you have?

1153