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
True or false A thesaurus is a brunch of commands grouped together as a single command used to automate task
Nina [5.8K]

False a thesaurus are a list of synonyms or antonyms

4 0
3 years ago
Match the job titles to the tasks
bija089 [108]

creates storyboards based on clients’ needs- Animator


assesses proposals for airplane designs to determine if they meet standards- Aeronautical engineer


uses special equipment and techniques to capture images- Commercial Photographer


creates software code, graphics, and multimedia elements for websites- Webpage designer

5 0
3 years ago
Read 2 more answers
What is modularity?
My name is Ann [436]

Answer:

Option D

Explanation:

Modularity in general defines the flexibility of a system. It is the degree to which a system can be broken down into smaller segments and then rearranged or recombines into new groups. Modularity is determined for multiple disciplines each having their own drawbacks.

8 0
3 years ago
Our tests will run your program with input 2, then run again with input 5. Your program should work for any input, though.
Dahasolnce [82]

Answer:

In Python:

numDays = int(input("Days: "))

print("Number of days: "+str(numDays)+"\n")

Explanation:

The program was written in Python and the explanation is as follows;

First, get the input for the number of days from the user

<em>numDays = int(input("Days: "))</em>

Next, print string "Number of days: " followed by the number input from the user and then newline

<em>print("Number of days: "+str(numDays)+"\n")</em>

<em>The character \n represents new line</em>

5 0
3 years ago
Which one of the following functional business systems supports the finance business function?
bogdanovich [222]
It seems that you have missed the given choices for this question, but anyway, here is the correct answer. The functional business systems that supports the finance business function are CASH MANAGEMENT and FINANCIAL FORECASTING. Hope this is the answer that you are looking for. 
5 0
3 years ago
Other questions:
  • How many times is "Alert" displayed in the following loop? for (int k =0; k&lt;= 100; k++) cout &lt;&lt; "Alert"; O 101 0 1 oo О
    7·1 answer
  • The first step in database design is defining a _____, which defines how data is created, represented, organized, and maintained
    13·1 answer
  • Gus has decided to organize his inbox on June 26th by using folders and deleting irrelevant messages
    10·2 answers
  • Complete the below function which dynamically allocates space to a 3d array of doubles, initializes all values to 0, and returns
    8·1 answer
  • . Why did the designers of the Synchronous Digital Hierarchy choose unusual values for data rates instead of the exact powers of
    11·1 answer
  • Consider the following methods.public void modParams(int[] x, int[] y, String[] s){x[1] = 5;y = x;s[1] = new String("five");s =
    6·1 answer
  • CHEMISTRY. metal+water》base+...............​
    12·1 answer
  • Question B_1 (15 points) Please define (describe) local variables and how they are used in computer programming ( e.g. In C, C )
    6·1 answer
  • 20 Points!
    15·1 answer
  • Using programming libraries is one way of incorporating existing code into new programs.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!