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
kifflom [539]
3 years ago
5

Help!

Engineering
1 answer:
Sauron [17]3 years ago
6 0

The program requires the use of loops.

Loops are simply used to perform repetitive operations.

The program in C, where comments are used to explain each line is as follows:

#include <stdio.h>

int main(){

   //This declares all the variables

   int n, idno, hours;    float rate,pay;

   //This gets input for the number of employees

   printf("Employees: "); scanf("%d", &n);

   //This is repeated n times

   for(int i = 0; i<n; i++){

       //This gets input for the identification number

       printf("Identification number: "); scanf("%d", &idno);

       //This gets input for the hours worked

       printf("Hours worked: "); scanf("%d", &hours);

       //This gets input for the hourly rate

       printf("Rate: "); scanf("%f", &rate);

       //This calculates the pay, after tax

       pay = rate * hours * 0.99;

       //This calculates the pay, after tax for hours greater than 36

       if(hours > 36){

           pay = 0.99 * (rate * 36 + 0.5 * rate * (hours - 36));

       }

       //This prints the required output

       printf("Identification number: %d Pay: %f\n",idno,pay);

   }

   return 0;

}

Read more about loops at:

brainly.com/question/18430675

You might be interested in
Put these expressions in a small program that will demonstrate whether they are true or false. Paste the code, and output from t
love history [14]

complete question:

Put these expressions in a small program that will demonstrate whether they are true or false. Paste the code, and output from the program into your submission. Use if statements and output a message indicating that the expression is True or False.

a = 5,  b = 4,  c = 3,  d = 2 ;

(a <= b + 1 )

(a < b && c > b)

(a >= c || d >= 5)

( !(a > b) )

( b >= a && ! (d < b) )

Answer:

a = 5

b = 4

c = 3  

d = 2

if a <= b + 1 :

       print("True")

else :

      print("False")

if a < b and c > b :

      print("True")

else :

      print("False")

if a >= c or d >= 5:

       print("True")

else :

       print("False")

if not(a > b):

       print("True")

else :

       print("False")

if ( b >= a and not(d < b) ):

       print("True")

else :

      print("False")

Explanation:

I used python to write the code

The equivalent of && in python is and while the equivalent of || is or. The equivalent of !  is not  in python .

I wrote an if statement to print True for each expression if it is actually true and the else statement print False if the expression is actually false.

For example the first expression says if a is less than or equal to b + 1(5). This statement is actually true so the expression will print True. a is 5 and b plus 1 is 5, so a is equal to 5 which is true.

if a < b and c > b :

Both expression must be true for the if statement to print True.  a is not less than b and c is not greater than b so the expression amount to False.

if a >= c or d >= 5:

One expression must be true for the expression to be True. a >= c is true and d >= 5 is false. So the expression amount to True.

not(a > b)

This simply means negate the statement a > b . This gives False.

( b >= a and not(d < b))

b >= a is false

d < b is true

not(d < b) is false

false and false is definitely False

6 0
3 years ago
What design advantages can you identify in the location of the controller
lubasha [3.4K]

Find case studies · Learn about meeting solutions · Review analyst reports ... Design FAQ ... Q. How do I configure the switch to connect with the WLC? ... This is precisely one of the greatest advantages of having WLCs in your wireless network. ... out the ARP request to the client will not know where the client is located.

8 0
3 years ago
Water flows near a flat surface and some measurements of the water velocity, u, parallel to the surface, at different heights y
BabaBlast [244]

Answer:

a) since u from equation1 and u from equation2 are not the same ( 1.7825 ft/s ≠ 3.165 ft/s ) then this equation is not valid for any system of units.

b) The velocity according to the equation at y=0 is equal to 0.81 ft/sec but since the fluid is flowing on flat surface which is stationary, this value is wrong hence the equation is NOT CORRECT

Explanation:

Given that;

range ⇒ 0 < y < 0

1ft is given by the equation u = 0.81 + 9.2y + (4.1 × 10³y³)

so u=velocity of water at different layers

y= height of the layer

a)

consider BG system of units

u(ft/s) = 0.81 + 9.2y + (4.1 × 10³y³)

and consider y=0.05 ft

u = 0.81 + 9.2(0.5) + (4.1 × 10³(0.5³)

u = 0.81 + 0.46 + 0.5125

u = 1.7825 ft/s lets say this is equation 1

now consider the SI system units

u(m/s) = 0.81 + 9.2y + (4.1 × 10³y³)

also consider y=0.05ft

1ft = 3.048×10⁻¹ (from conversion table)

so 0.05ft = 0.01524m

we substitute

u(m/s) = 0.81 + 9.2(0.01524m) + (4.1 × 10³(0.01524m)³)

u = 0.81 + 0.1402 + 1.4512×10⁻²

u = 0.9647 m/s

1m/s = 3.281 ft per seconds ( conversion table)

so

0.9647 m/s = 0.9647(3.281)

u = 3.165 ft/s lets say this is equation 2

now since u from equation1 and u from equation2 are not the same ( 1.7825 ft/s ≠ 3.165 ft/s ) then this equation is not valid for any system of units.

b)

we know that the velocity of water at the surface contact is zero

u=0

so from the equation

u = 0.81 + 9.2y + (4.1 × 10³y³)

at y = 0

u = 0.81 + 9.2(0) + (4.1 × 10³(0)³)

u = 0.81 ft/s

The velocity according to the above equation at y=0 is 0.81 ft/sec but since the fluid is flowing on flat surface which is stationary this value is wrong hence the equation is NOT CORRECT

5 0
4 years ago
Using a forked rod, a 0.5-kg smooth peg P is forced to move along the vertical slotted path r = (0.5 θ) m, whereθ is in radians.
-BARSIC- [3]

Answer:

N_c = 3.03 N

F = 1.81 N

Explanation:

Given:

- The attachment missing from the question is given:

- The given expressions for the radial and θ direction of motion:

                                       r = 0.5*θ

                                       θ = 0.5*t^2              ...... (correction for the question)

- Mass of peg m = 0.5 kg

Find:

a) Determine the magnitude of the force of the rod on the peg at the instant t = 2 s.

b) Determine the magnitude of the normal force of the slot on the peg.

Solution:

- Determine the expressions for radial kinematics:

                                        dr/dt = 0.5*dθ/dt

                                        d^2r/dt^2 = 0.5*d^2θ/dt^2

- Similarly the expressions for θ direction kinematics:

                                        dθ/dt = t

                                        d^2θ/dt^2 = 1

- Evaluate each at time t = 2 s.

                                        θ = 0.5*t^2 = 0.5*2^2 = 2 rad -----> 114.59°

                                        r = 1 m , dr / dt = 1 m/s , d^2 r / dt^2 = 0.5 m/s^2

- Evaluate the angle ψ between radial and horizontal direction:

                                        tan Ψ = r / (dr/dθ) = 1 / 0.5

                                        Ψ = 63.43°

- Develop a free body diagram (attached) and the compute the radial and θ acceleration:

                                        a_r = d^2r / dt^2 - r * dθ/dt

                                        a_r = 0.5 - 1*(2)^2 = -3.5 m/s^2

                                        a_θ =  r * (d^2θ/dt^2) + 2 * (dr/dt) * (dθ/dt)

                                        a_θ = 1(1) + 2*(1)*(2) = 5 m/s^2

- Using Newton's Second Law of motion to construct equations in both radial and θ directions as follows:

Radial direction:              N_c * cos(26.57) - W*cos(24.59) = m*a_r

θ direction:                      F  - N_c * sin(26.57) + W*sin(24.59) = m*a_θ

Where, F is the force on the peg by rod and N_c is the normal force on peg by the slot. W is the weight of the peg. Using radial equation:

                                       N_c * cos(26.57) - 4.905*cos(24.59) = 0.5*-3.5

                                       N_c = 3.03 N

                                       F  - 3.03 * sin(26.57) + 4.905*sin(24.59) = 0.5*5

                                       F = 1.81 N

4 0
3 years ago
A 0.01 significance level is used for a hypothesis test of the claim that when parents use a particular method of gender? select
Nataly_w [17]

Answer:

Option D

H_o equals 0.5 H_a less than 0.5

Explanation:

Information given

N=144

X=66

P=\frac {x}{n}=66/144= 0.458333\approx 0.46

The hypothesis

Null hypothesis

Probability, p =0.5

H_o: p =0.5

Alternative hypothesis

Probability, p<0.5

H_a: p

5 0
4 years ago
Other questions:
  • A car starts at rest and moves along a perfectly straight highway with an acceleration of α1 = 10 m/s2 for a certain amount of t
    15·1 answer
  • How old must you be to operate a forklift
    10·2 answers
  • What impact does modulus elasticity have on the structural behavior of a mechanical design?
    14·1 answer
  • A primary incentive for entrepreneurs is
    5·1 answer
  • Are we living in a simulation! <br> True <br> False
    12·2 answers
  • Tech A says that both OSHA and the EPA can inspect facilities for violations. Tech B says that a shop safety rule does not have
    5·1 answer
  • A rectangular channel 3-m-wide carries 12 m^3/s at a depth of 90cm. Is the flow subcritical or supercritical? For the same flowr
    15·1 answer
  • A European apparel manufacturer has production facilities in Italy and China to serve its European market, where annual demand i
    6·1 answer
  • A programmable integrated circuit (PIC) is another name for a microcontroller.
    11·1 answer
  • Your teacher gives you extra h.w on the weekends if the class average on the exam is under 75%.this is an example of
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!