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
Goodmorning I need help with this question. And may you explain to me how to get this right step by step. Thank you.​
katen-ka-za [31]

Answer:

I think it's "C"

Step-by-step explanation:

Because a function is the independent variable to the dependent variable... Since, the cost relies on the weight, the cost is dependent. While, the weight is independent. I don't know if I'm right, I kinda suck at math

3 0
3 years ago
you need to use a corded drill on something 50 feet away from the nearest outlet. if the cord on your drill is 8' and you have t
koban [17]
All three
16+16+16=48+8 =over 50  (56)
6 0
3 years ago
Please help me with this question
jok3333 [9.3K]

9514 1404 393

Answer:

  -3/8 × (first term)

Step-by-step explanation:

The general term of an arithmetic sequence is ...

  an = a1 +d(n -1)

Then the ratio of interest is ...

  (7th term)/(9th term) = 5/8

  (a1 +6d)/(a1 +8d) = 5/8

Multiplying by 8(a1 +8d) we get ...

  8(a1 +6d) = 5(a1 +8d)

  8a1 +48d = 5a1 +40d . . . . . . eliminate parentheses

  8d = -3a1 . . . . . . . . . . . . . . subtract 40d+8a1

  d = (-3/8)a1 . . . . . . . . . . divide by 8 to find the common difference

The common difference is -3/8 times the first term.

__

<u>Example</u>

Let the first term be -16. Then the common difference is (-3/8)(-16) = 6. The first 9 terms of the sequence are ...

  -16, -10, -4, 2, 8, 14, 20, 26, 32

The ratio of the 7th and 9th terms is ...

  20/32 = 5/8 . . . . as required

__

In the general case, the ratio of terms would be ...

  (a1 +(-3/8a1)(7 -1))/(a1 +(-3/8a1)(9 -1)) = (1 -6(3/8))/(1 -8(3/8)) = (-10/8)/(-16/8) = 5/8

8 0
3 years ago
01:59:13
BlackZzzverrR [31]

Correct Question:

Stan ran 4\frac{7}{10} miles, which was 1\frac{3}{10} fewer miles than Matt ran. Four students wrote and solved equations to find m, the number of miles that Matt ran. Which student wrote and solved the equation correctly?

Molly’s work:

M + 1\frac{3}{10} = 4\frac{7}{10}; M = 5\frac{10}{10} = 6.

Emma’s work:

M - 1\frac{3}{10} = 4\frac{7}{10}; M = 3\frac{10}{10} = 4

Alysa’s work:

M + 1\frac{3}{10} = 4\frac{7}{10}; M = 3\frac{4}{10} = 3 and two-fifths

Maddie’s work:

M - 1\frac{3}{10} = 4\frac{7}{10}; M = 5\frac{10}{10} = 6

Answer:

Molly's Work is correct

M + 1\frac{3}{10} = 4\frac{7}{10}; M = 5\frac{10}{10} = 6.

Step-by-step explanation:

Let S represent distance covered by Stan and M represent the distance covered by Matt;

Given that the distance covered by Stan is 4\frac{7}{10} miles and it is 1\frac{3}{10} miles less than that covered by Matt;

This can be represented mathematically as

S = M - 1\frac{3}{10}

By substituting 4\frac{7}{10} for S;

This gives

4\frac{7}{10} = M - 1\frac{3}{10}

By collecting like terms

4\frac{7}{10} = M - 1\frac{3}{10} becomes

4\frac{7}{10} + 1\frac{3}{10} = M

Reorder

M = 4\frac{7}{10} + 1\frac{3}{10} ---- This is the correct equation

Solving further to get the distance covered by Matt;

Split fraction

M = 4 + \frac{7}{10} + 1 + \frac{3}{10}

Collect like terms

M = 4 + 1 +  \frac{7}{10} + \frac{3}{10}

M = 5 +  \frac{7}{10} + \frac{3}{10}

Add fraction (Take LCM)

M = 5 + \frac{7 + 3}{10}

M = 5 + \frac{10}{10}

Divide Fraction

M = 5 + 1

M = 6

Hence, the equation of the system is

M = 4\frac{7}{10} + 1\frac{3}{10}

and the solution is M = 6

Molly’s work is correct

7 0
3 years ago
Which of the following illustrates the truth value of the following mathematical statements? 6 + 3 = 9, and 5 • 5 = 20v
Ymorist [56]
V=5/4 ...
8 0
4 years ago
Other questions:
  • Factor the following trinomials x2-18x+81
    12·2 answers
  • Given: f(x) = xand g(x) = x +1, find g[f(-2)].<br> 1<br> 5<br> -3
    13·2 answers
  • What are the initial value and rate of change from this table???? Explain!!
    6·1 answer
  • Monica’s school band held a car wash to raise money for a trip to a parade in New York City. After washing 125 cars, they made $
    6·2 answers
  • 14x+2y-22=10<br> 2x+8y+42=32<br> 30x+124-42=24
    7·2 answers
  • The measure of angle 3 is 42°. <br><br> What is the measure of angle 1 in degrees?
    8·1 answer
  • Solve for z.<br><br> z<br> 7<br> = 8<br><br><br> z =
    11·2 answers
  • Answer the question below in the image
    15·1 answer
  • Joanna is reading a storybook. The ratio of the number of pages she read to
    15·1 answer
  • Hey am back who ever reported me and make then give me a warning well that wont stop me if they banned me it wont stop meh :&gt;
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!