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
viktelen [127]
4 years ago
8

A program contains the following function definition: int cube(int number) { return number * number * number; } Write a stateme

nt that calls this function, passing the value 4 as an argument, and assigns the function's return value to the variable result.
Engineering
1 answer:
Nonamiya [84]4 years ago
8 0

Answer:

The statement can be written as

int result = cube(4);

Explanation:

A function is a block of reusable codes to perform some tasks. For example, the function in the question is to calculate the cube of a number.

A function can also operate on one or more input value (argument) and return a result. The <em>cube </em>function in the question accept one input value through its parameter <em>number </em>and the <em>number</em> will be multiplied by itself twice and return the result.  

To call a function, just simply write the function name followed with parenthesis (e.g. <em>cube()</em>). Within the parenthesis, we can include zero or one or more than one values as argument(s) (e.g. <em>cube(4)</em>).

We can then use the "=" operator to assign the return output of the function to a variable (e.g. <em>int result = cube(4)</em>)

You might be interested in
12-32 The Clear Brook High School band is holding a car wash as a fund-raiser to buy new equipment. The average time to wash a c
goldenfox [79]

Answer:

69

Explanation:

nsnsksnsksmsjkshibxff

4 0
4 years ago
Savabuck University has installed standard pressure-operated flush valves on their water closets. When flushing, these valves de
Dvinal [7]

Answer:

Cost = $2527.2 per month.

Explanation:

Given that

Discharge ,Q = 130 L/min

 So

Q=0.13\ m^3/min

Cost =  $0.45 per cubic meter

1 month = 30 days

1 days = 24 hr = 24 x 60 min

1 month = 30 x 24 x 60 min

1 month = 43,200 min

Lets xm^3\ water\ waste\ in\ a\ month

x = 0.13 x 43,200

x=5616\ m^3

So the total cost = 5616 x 045 $

Cost = $2527.2 per month.

7 0
4 years ago
The 30-kg gear is subjected to a force of P=(20t)N where t is in seconds. Determine the angular velocity of the gear at t=4s sta
tatyana61 [14]

Answer:

\omega =\frac{24}{1.14375}=20.983\frac{rad}{s}

Explanation:

Previous concepts

Angular momentum. If we consider a particle of mass m, with velocity v, moving under the influence of a force F. The angular  momentum about point O is defined as the “moment” of the particle’s linear momentum, L, about O. And the correct formula is:

H_o =r x mv=rxL

Applying Newton’s second law to the right hand side of the above equation, we have that r ×ma = r ×F =

MO, where MO is the moment of the force F about point O. The equation expressing the rate of change  of angular momentum is this one:

MO = H˙ O

Principle of Angular Impulse and Momentum

The equation MO = H˙ O gives us the instantaneous relation between the moment and the time rate of change of angular  momentum. Imagine now that the force considered acts on a particle between time t1 and time t2. The equation MO = H˙ O can then be integrated in time to obtain this:

\int_{t_1}^{t_2}M_O dt = \int_{t_1}^{t_2}H_O dt=H_0t2 -H_0t1

Solution to the problem

For this case we can use the principle of angular impulse and momentum that states "The mass moment of inertia of a gear about its mass center is I_o =mK^2_o =30kg(0.125m)^2 =0.46875 kgm^2".

If we analyze the staritning point we see that the initial velocity can be founded like this:

v_o =\omega r_{OIC}=\omega (0.15m)

And if we look the figure attached we can use the point A as a reference to calculate the angular impulse and momentum equation, like this:

H_Ai +\sum \int_{t_i}^{t_f} M_A dt =H_Af

0+\sum \int_{0}^{4} 20t (0.15m) dt =0.46875 \omega + 30kg[\omega(0.15m)](0.15m)

And if we integrate the left part and we simplify the right part we have

1.5(4^2)-1.5(0^2) = 0.46875\omega +0.675\omega=1.14375\omega

And if we solve for \omega we got:

\omega =\frac{24}{1.14375}=20.983\frac{rad}{s}

8 0
3 years ago
26 V is measured across a 220 Ω resistance. This means that resistor current equals ________. Group of answer choices 1.2 A 57 A
zysi [14]
You can use ohm’s law
I=V/R
3 0
3 years ago
The change in specific internal energy depends on the path of a process. a)-True b)-False
Basile [38]

Answer:

(b) False

Explanation:

The specific internal energy of the system does not depend on the path of the process, it is a state function means its depend on only on the initial and the final position it does not depend on the path which it follow in the process.Internal energy is associated with the random motion of the molecules.

So it is false statement as internal energy is not a path function

7 0
3 years ago
Other questions:
  • What is reciprocity?
    14·2 answers
  • Design an op amp circuit to average the input of six sensors used to measure temperature in restaurant griddles for a large fast
    7·1 answer
  • Suppose there are 93 packets entering a queue at the same time. Each packet is of size 4 MiB. The link transmission rate is 1.4
    9·1 answer
  • Which of the following activities could be considered unethical?
    7·1 answer
  • In engineering economic analysis, it is permissible to sum dollar amounts without conversion only when __________ .
    5·1 answer
  • A hydrological system consists of five horizontal formations with an equal thickness of 10 m each. The hydraulic conductivities
    13·1 answer
  • 25 pts!!!
    12·1 answer
  • Liquid methanol is pumped from a large storage tank through a 1-in.ID pipe at a rate of 3.00gal/mm.
    5·1 answer
  • The air conditioner in a house or a car has a cooler that brings atmospheric air from 30C to 10C, with both states at 101KPa. If
    12·1 answer
  • Explain how smart materials can be used by manufacturers to improve health and safety for children's products and goods.​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!