# C Program For Find The Gross Salary of an Employee

Problem:- Write A C Program For Find The Gross Salary Of An Employee .gross salary is different from Net Salary, Gross salary calculated annual basis we can calculate a gross salary by using the following formula (Gross salary = Net Salary - Deduction. )
Deduction = Tax ( HRA. + DA. + MA. ).

Check This:- Hacker rank solution for Strings, Classes, STL, Inheritance in C++.

Formula's :- Gross Salary = Basic + DA + HRA + MA.
Deduction = Gross Salary - Pf - Pt - It.
Net Salary = Gross Salary - Deduction.

Logic:- For finding a gross salary of Employee we need to calculate DA and HRA Then Sum Of Basic Salary + HRA + DA. after calculating the sum print the sum. So basically first we calculate a DA, and HRA after that we add basic salary + HRA +DA  so, in this way, we can find the Gross salary of an employee.

Also Check:- Geeksforgeeks solution for School, Basic, Easy, Medium, Hard in C++.

Solution:-

#include<stdio.h>

int main()
{
Visit http://www.programmingwithbasics.com/
*/

float GrossPayment,basic,da,hra,da1,hra1;

printf("Enter basic salary : ");
scanf("%f", &basic);

printf("Enter DA : ");
scanf("%f", &da1);

printf("Enter HRA : ");
scanf("%f", &hra1);

da = (da1 * basic) / 100;
hra = (hra1 * basic) / 100;

GrossPayment = basic + da + hra;

printf("\nGross Salary :%f\n",GrossPayment);
return (0);
}

Output:-

## You May Like This:-

Previous Post
Next Post

#### post written by: Ghanendra Yadav

Hi, I’m Ghanendra Yadav, SEO Expert, Professional Blogger, Programmer, and UI Developer. Get a Solution of More Than 500+ Programming Problems, and Practice All Programs in C, C++, and Java Languages. Get a Competitive Website Solution also Ie. Hackerrank Solutions and Geeksforgeeks Solutions. If You Are Interested to Learn a C Programming Language and You Don't Have Experience in Any Programming, You Should Start with a C Programming Language, Read: List of Format Specifiers in C.
{"ft_lang_label":"__label__en","ft_lang_prob":0.6684308,"math_prob":0.9214879,"size":3870,"snap":"2022-40-2023-06","text_gpt3_token_len":1008,"char_repetition_ratio":0.15830316,"word_repetition_ratio":0.9149254,"special_character_ratio":0.28268734,"punctuation_ratio":0.1862872,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9523827,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-01-31T03:27:30Z\",\"WARC-Record-ID\":\"<urn:uuid:782a8101-be03-40d7-b281-c867e3921961>\",\"Content-Length\":\"128152\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:c43218c1-76c3-4145-95e6-b1d1d083ee6c>\",\"WARC-Concurrent-To\":\"<urn:uuid:96e769ec-3a0b-4268-bdc3-b274329f6951>\",\"WARC-IP-Address\":\"172.253.122.121\",\"WARC-Target-URI\":\"https://www.programmingwithbasics.com/2016/03/c-program-for-find-gross-salary-of.html\",\"WARC-Payload-Digest\":\"sha1:3OXCATQGTJ6NDSE5GXEU34WKQ4724RPP\",\"WARC-Block-Digest\":\"sha1:AIWBWSJM4TFV5T5RPWTGLKIAZD4WXF7A\",\"WARC-Identified-Payload-Type\":\"application/xhtml+xml\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-06/CC-MAIN-2023-06_segments_1674764499842.81_warc_CC-MAIN-20230131023947-20230131053947-00278.warc.gz\"}"}