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
Sonja [21]
4 years ago
10

Write a function called pyramid(height) that acceptsa parameter ""height"". It then prints a pyramid of that height

Engineering
1 answer:
vichka [17]4 years ago
5 0

Answer:

I am writing a function in C++                              

Explanation:

<h2>C++ program</h2>

#include <iostream>

using namespace std;

int pyramid(int height) // function pyramid with parameter height

{int distance; //variable for spaces

   for(int i = 1, j = 0; i <= height; ++i, j= 0)  //handle the rows

   {

for(distance= 1; distance<= height-i; ++distance)

// handles the spaces & columns

    { cout <<"  ";        } //prints spaces between stars

       while(j!= 2*i-1)  //handles shape and spaces

       {   cout << "* "; // printing stars

           ++j;        }

       cout << '\n';    }   } // for the next line

int main()

{

int height; //declare height variable

cout <<"Enter height of pyramid "; //asks user to enter height of pyramid

cin>>height; //stores value of height

pyramid(height); //calls pyramid function

}

You might be interested in
Liệt kê 10 quá trình sản xuất trong công nghiệp có sử dụng chất xúc tác
Ugo [173]

Answer: English please!

Explanation:

3 0
3 years ago
Jim starts walking from a bus stop. He walks north for 10 km. Next, he walks east for 5 km. He then walks south for 10 km. Next,
Luda [366]

Answer:

b

Explanation:

8 0
3 years ago
Help plsss fast!!!!!!
Semmy [17]

Answer:

1. Cast iron or aluminum

2. aluminum (first blank) iron(second blank)

3. aluminum

4. dry sleeve

5. Wet sleeve

6. matching operation that cuts a series of holes through the block for crankshaft bearing

8 0
3 years ago
Write the definitions for engineering stress, true stress, engineering strain, and true strain for loading along a single axis.
shusha [124]

Answer and Explanation:

Engineering Stress of a material is defined as the applied load or force divided by the original cross sectional Area of the material.

σ(engineering) = F/(Ao)

True Stress is defined as the applied load or force divided by the actual cross-sectional area (the changing area with respect to time) of the material at that point in time. It's an instantaneous stress.

σ(true) = F/A

Engineering strain is a measure of how much a material deforms under a particular load. It is the amount of deformation in the direction of the applied force divided by the initial length of the material.

ε(engineering) = Δl/lo

True Strain measures instantaneous deformation. It is obtained mathematically by integrating strain over small time periods and summing them up. Hence,

ε(true) = In (lf/lo)

The calculations,

First step, 10m to 10.1m, Δl = 0.1m, lf = 10.1m, lo = 10m

ε(engineering) = 0.1/10 = 0.01

ε(true) = In (10.1/10) = 0.00995

Second step, 10.1m to 10.2m, Δl = 0.1m, lf = 10.2m, lo = 10.1m

ε(engineering) = 0.1/10.1 = 0.0099

ε(true) = In (10.2/10.1) = 0.00985

Overall, 10m to 10.2m, Δl = 0.2m, lf = 10.2m, lo = 10m

ε(engineering) = 0.2/10 = 0.02

ε(true) = In (10.2/10) = 0.0198

QED!

5 0
3 years ago
The natural material in a borrow pit has a mass unit weight of 110.0 pcf and a water content of 6%, and the specific gravity of
enot [183]

Answer:

A. 288,030.91 cy

B. The amount of water that must be removed from the natural material is 483541.04254 gallons of water

Explanation:

The natural material in the barrow properties are;

The mass unit weight, γ = 110.0 pcf

The water content, w = 6%

The specific gravity of the soil solids, G_s = 2.63

The desired dry unit weight, \gamma _d = 122 pcf

The water content, w₁ = 5.5 %

The net section volume, V_T = 245,000 cy = 6,615,000 ft³

A.  \gamma _d = W_s/V_T

∴ W_s = V_T × \gamma _d = 6,615,000 ft³ × 122 lb/ft³ = 807030000 lbs

w = (W_w/W_s) ×  100

∴ W_w = (w/100) × W_s = (6/100) × 807030000 lbs = 48421800 lbs

The weight of solids

W = W_s + W_w = 807030000 lbs + 48421800 lbs = 855451800 lbs

V = W/γ = 855451800 lbs/(110.0 lb/ft.³) = 7776834.54545 ft.³ = 288,030.91 cy

V = 288,030.91 cy

The amount of cubic yards of borrow required = 288,030.91 cy

B. The volume of water in the required soil is found as follows;

W_{w1} = (w₁/100) × W_s = (5.5/100) × 807030000 lbs = 44386650 lbs

The amount of water that must be added =  W_{w1} - W_w = 44386650 lbs - 48421800 lbs = -4,035,150 lbs

Therefore, 4,035,150 lbs of water must be removed

The density of water, ρ = 8.345 lbs/gal

Therefore, V = 4,035,150 lbs/(8.345 lbs/gal) = 483541.04254 gal  of water must be removed from the natural material

7 0
3 years ago
Other questions:
  • Explain the purpose of the checkpoint mechanism. How often should checkpoints be performed?How does the frequency of checkpoints
    6·1 answer
  • A multistage pump is required to deliver water to a head of 50 m at flow rate of 0.1 m^3/s. A motor rotating at 1800 rpm is avai
    8·1 answer
  • The ice on the rear window of an automobile is defrosted by attaching a thin, transparent, film type heating element to its inne
    8·1 answer
  • g A steel water pipe has an inner diameter of 12 in. and a wall thickness of 0.25 in. Determine the longitudinal and hoop stress
    5·1 answer
  • What are factor of safety for brittle and ductile material
    5·1 answer
  • You are evaluating the lifetime of a turbine blade. The blade is 4 cm long and there is a gap of 0.16 cm between the tip of the
    9·1 answer
  • A saturated 1.5 ft3 clay sample has a natural water content of 25%, shrinkage limit (SL) of 12% and a specific gravity (GS) of 2
    11·1 answer
  • The primary of an ideal transformer has 400 turns and its secondary has 200 turns. Neglecting electrical losses, if the power in
    7·1 answer
  • Sketch the asymptotes of the Bode plot magnitude and phase for the open-loop transfer ()=100(S+1)/((S+10)(S+100)) Use MATLAB to
    13·1 answer
  • Consider fully developed flow in a circular pipe with negligible entrance effects. If the length of the pipe is doubled, the pre
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!