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
Gennadij [26K]
3 years ago
12

Write the computer program for;urgent​

Mathematics
1 answer:
AlladinOne [14]3 years ago
8 0

ANSWER:

#include <stdio.h>

#define PAYRATE 10 //basic pay rate per hour

#define OVERTIME 15 //in excess of 40 hours a week

int NetPay(int hours);

int main()

{

int userWeeklyHours;

printf("Please enter your total weekly working hours: \n");

scanf("%d", &userWeeklyHours);// get the user weekly hours

NetPay(userWeeklyHours);

return 0;

}

int NetPay(int hours)// implementing the function to calculate total pay, total taxes, and net pay

{

int firstRate, secondRate, restOfRate, secondAmount, rest, payAfterTax, payedBeforeTax, overHours;

if (hours > 40)

{

overHours = hours - 40;

payedBeforeTax = (40 * PAYRATE) + (overHours * OVERTIME);

}

else

payedBeforeTax = hours * PAYRATE;//defining the user first paycheck before taxes

if (payedBeforeTax <= 300)//paying only first rate case

{

firstRate = payedBeforeTax*0.15;

payAfterTax =payedBeforeTax - firstRate;

printf("your total gross is %d, your taxes to pay are %d, your net pay is %d", payedBeforeTax, firstRate, payAfterTax);

}

else if (payedBeforeTax > 300 && payedBeforeTax <= 450)//paying first and second rate

{

secondAmount = payedBeforeTax - 300;

firstRate = (payedBeforeTax - secondAmount) * 0.15;

secondRate = secondAmount * 0.20;

payAfterTax = payedBeforeTax - (firstRate + secondRate);

printf("your total gross is %d, your taxes to pay are %d, your net pay is %d", payedBeforeTax, firstRate + secondRate, payAfterTax);

}

else if (payedBeforeTax > 450)// paying all rates

{

rest = payedBeforeTax - 450;

secondAmount = (payedBeforeTax - 300) - rest;

firstRate = (payedBeforeTax - (rest + secondAmount)) * 0.15;

secondRate = secondAmount * 0.20;

restOfRate = rest * 0.25;

payAfterTax = payedBeforeTax - (firstRate + secondRate + restOfRate);

printf("your total gross is %d, your taxes to pay are %d, your net pay is %d", payedBeforeTax, firstRate + secondRate + restOfRate, payAfterTax);

}

return payAfterTax;

}

You might be interested in
What value does the 5 represent in the number 0.775
Zepler [3.9K]

Answer:1000th

Step-by-step explanation:

7 0
3 years ago
Read 2 more answers
The original price of a Kindle is $269.99. If a discount of 15% is given, what is the amount of the discount?
andrey2020 [161]

15% of $269.99 = 0.15 x 269.99 = $40.50 (nearest cent)


Answer: $40.50

6 0
3 years ago
The expression 475 * 1.076 ^ t the average annual per capita health care costs, in dollars, in the US as a function of the numbe
Alik [6]

Answer:

Y(t)= 475 (1.076)^t

Where Y(t) represent the average annual per capita health care costs

475 represent the initial amount for the average annual per capita health care costs

t represent the number of years since 1970

And 1.076 represent the growth factor given by:

1+r = 1.076

And solving for r we got:

r = 1.076-1 =0.076

So for this case we can say that the value 1.076 represent the growth factor.

Step-by-step explanation:

For this case we have the following model given:

Y(t)= 475 (1.076)^t

Where Y(t) represent the average annual per capita health care costs

475 represent the initial amount for the average annual per capita health care costs

t represent the number of years since 1970

And 1.076 represent the growth factor given by:

1+r = 1.076

And solving for r we got:

r = 1.076-1 =0.076

So for this case we can say that the value 1.076 represent the growth factor.

7 0
3 years ago
Read 2 more answers
What type of triangle is shown in the image?
Sergeu [11.5K]

Answer:

<h2><u><em>Acute isosceles triangle</em></u></h2>

Step-by-step explanation:

What type of triangle is shown in the image?

A triangle with two sides that are each eight units, and one side that is five units. Two angles are seventy degrees, and one angle is forty degrees.

Acute scalene triangle

Obtuse scalene triangle

<h2><u><em>Acute isosceles triangle</em></u></h2>

Right isosceles triangle

4 0
2 years ago
A class of 64 students was given 320 book how many will each students take home
uranmaximum [27]

<em>Each</em><em> </em><em>student</em><em> </em><em>will</em><em> </em><em>take</em><em>=</em><em>3</em><em>2</em><em>0</em><em>/</em><em>6</em><em>4</em>

<em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em>=</em><em>5</em>

<em>So</em><em> </em><em>the</em><em> </em><em>ans</em><em>wer</em><em> </em><em>is</em><em> </em><em>5</em><em>.</em>

<em>Hope</em><em> </em><em>it</em><em> </em><em>will</em><em> </em><em>be</em><em> </em><em>helpful</em><em> </em><em>to</em><em> </em><em>you</em><em>.</em><em>.</em><em>.</em>

<em>✧◝(⁰▿⁰)◜✧</em>

4 0
3 years ago
Other questions:
  • Convert to scientific notation.<br> 1,860,000,000
    9·1 answer
  • The functions f(x) = (x + 1)2 − 2 and g(x) = −(x − 2)2 + 1 have been rewritten using the completing-the-square method. Is the ve
    9·1 answer
  • Convert 8.3 to a percent. A. 0.083% B. 8.3% C. 83% D. 830%
    5·2 answers
  • Jacob made a circle-shaped poster for his geometry class.
    7·1 answer
  • Solve.<br> 2x + 6 ≥ -8<br><br> A.) x ≥ -8<br><br> B.) x ≤ -8<br><br> C.) x ≥ -5<br><br> D.) x ≤ -5
    7·1 answer
  • The volume of a cylinder is 30 pie cubic units. A cone shares the same base. The height of the cone is twice the height of the c
    9·1 answer
  • Determine whether each pair of actions results in independent or dependent events.
    10·1 answer
  • Need help fast plzzzzzzzzzzzzzzzzzzzz
    13·2 answers
  • A pack of bottel of juice cost 9.09 how much does each bottle cost to the nearest cent
    14·2 answers
  • PLS HELP ME !! ( WILL GIVE BRAINLIEST )
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!