1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Sedbober [7]
4 years ago
11

Write a C program to input basic salary of an employee and calculate gross salary according to given conditions.

Computers and Technology
1 answer:
kkurt [141]4 years ago
3 0

Answer:

Written in C

#include <stdio.h>

int main() {

   float salary;

   printf("Salary: ");

   scanf("%f", &salary);

   float HRA, DA;

   if(salary <= 10000){

       HRA = 0.20; DA = 0.80;

   }

   else if(salary >= 10000 && salary <= 20000){

       HRA = 0.25; DA = 0.90;

   }

   else{

       HRA = 0.30; DA = 0.95;

   }

   salary = salary + salary * HRA + salary * DA;

     printf("Gross Salary: %.2f\n", salary);

   return 0;

}

Explanation:

I've added the full program as an attachment where I used comments as explanation

Download txt
You might be interested in
To create a file in dos edit, type ____ at the command prompt to start dos edit, and then begin typing in the document window.
Alex777 [14]
Edit filename.ext




----------------------------------------
3 0
4 years ago
How long does it take to wire a house?
Licemer1 [7]

Answer:

the rewiring of an entire home may take up to a week. Smaller jobs, like wiring a single room, may take one to two days

Explanation:

4 0
3 years ago
Read 2 more answers
Why is it hard for some people to keep a promise even one that they make to themselves​
tresset_1 [31]

Answer:

Awww what happened? Sometimes its hard for me to keep a promise.

Explanation:

7 0
3 years ago
Read 2 more answers
If you have cable internet service, what protocol is used between the head end connection and the cable company's network
julsineya [31]
The answer would be (DOCSIS). :)

Have a blessed day and hope this helps!
7 0
3 years ago
Which part of the ethernet address is assigned to vendors to identify the equipment?
Nitella [24]

First three bytes of the ethernet address exists assigned to vendors to identify the equipment.

<h3>What is Ethernet address?</h3>

A media access control address stands for a unique identifier allocated to a network interface controller for usage as a network address in communications within a network segment. This use exists as standard in most IEEE 802 networking technologies, including Ethernet, Wi-Fi, and Bluetooth.

This address exists as the identifying mark that allows a networked computer to communicate with the Internet. The ethernet address exists how we can associate an “IP address” to an individual computer — without this– number, there's no form to access any servers, websites, email, etc.

The first three bytes (pairs of hexadecimal characters) of any unicast address include that vendor address component of the MAC address. The staying three bytes carry the serial number of that vendor's interface card. Dell, Inc. Apple, Inc.

Hence, first three bytes of the ethernet address exists assigned to vendors to identify the equipment.

To learn more about Ethernet address refer to:

brainly.com/question/7284219

#SPJ4

4 0
1 year ago
Other questions:
  • What is the legal right granted to all authors and artists that gives them sole ownership and use of their words, software, pict
    9·2 answers
  • Julio is the department head for his company's customer service department. His staff has complained that they spend countless h
    13·2 answers
  • To change the background color of a page, which tab would you use?
    15·2 answers
  • 6.67
    5·1 answer
  • You have a network of 300 users. You are finding that you must frequently restore files from backup that users have accidentally
    13·1 answer
  • Which of the following are examples of how a company might use consumer data it had collected? a To decide what types of product
    10·1 answer
  • How does a author develop a character in a story?
    14·2 answers
  • 5 negative impacts of digital life Explain
    9·1 answer
  • What statement describes the last step in evaluating<br> information?
    10·1 answer
  • When a computer is infected by a virus, _______.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!