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]
3 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]3 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
Two sites are being considered for wind power generation. On the first site, the wind blows steadily at 7 m/s for 3000 hours per
kirill [66]

Solution :

Given :

$V_1 = 7 \ m/s$

Operation time, $T_1$ = 3000 hours per year

$V_2 = 10 \ m/s$

Operation time, $T_2$ = 2000 hours per year

The density, ρ = $1.25 \ kg/m^3$

The wind blows steadily. So, the K.E. = $(0.5 \dot{m} V^2)$

                                                             $= \dot{m} \times 0.5 V^2$

The power generation is the time rate of the kinetic energy which can be calculated as follows:

Power = $\Delta \ \dot{K.E.} = \dot{m} \frac{V^2}{2}$

Regarding that $\dot m \propto V$. Then,

Power $ \propto V^3$ → Power = constant x $V^3$

Since, $\rho_a$ is constant for both the sites and the area is the same as same winf turbine is used.

For the first site,

Power, $P_1= \text{const.} \times V_1^3$

            $P_1 = \text{const.} \times 343 \ W$

For the second site,

Power, $P_2 = \text{const.} \times V_2^3 \ W$

           $P_2 = \text{const.} \times 1000 \ W$

5 0
3 years ago
Sea A una matriz 3x3 con la propiedad de que la transformada lineal x → Ax mapea R³ sobre R³.
skelet666 [1.2K]

Answer:

ax

Explanation:

7 0
3 years ago
Evan notices a small fire in his workplace. Since the fire is small and the atmosphere is not smoky he decides to fight the fire
Norma-Jean [14]

Answer:

not calling the firemean

Explanation:

7 0
3 years ago
with a digital system, if you have measured incorrectly and use too low of a kvp for adequate penetration, what do you need to d
Lubov Fominskaja [6]

The x-ray beam's penetrating power is regulated by kVp (beam quality). Every time an exposure is conducted, the x-rays need to be powerful (enough) to sufficiently penetrate through the target area.

<h3>How does kVp impact the exposure to digital receptors?</h3>

The radiation's penetration power and exposure to the image receptor both increase as the kVp value is raised.

<h3>Exposure to the image receptor is enhanced with an increase in kVp, right?</h3>

Due to an increase in photon quantity and penetrability, exposure at the image receptor rises by a factor of five of the change in kVp, doubling the intensity at the detector with a 15% change in kVp.

To know more about kVp visit:-

brainly.com/question/17095191

#SPJ4

5 0
1 year ago
Drag each tile to the correct box.
Trava [24]

Answer:

Bluray

DVD

CD

Explanation:

Blu ray can hold 25gb per layer

Dvd can hold 4.7GB on a single layer

Cd can hold around 737 mb

Also, dvds can go up to 2 layers

Blu ray can go up to 4

6 0
3 years ago
Other questions:
  • Consider a Mach 4.5 airflow at a pressure of 1.25 atm. We want to slow this flow to a subsonic speed through a system of shock w
    15·1 answer
  • At a certain location, wind is blowing steadily at 10 m/s. Determine the mechanical energy of air per unit mass and the power ge
    5·1 answer
  • A string of ASCII characters has been converted to hexadecimal resulting in the following message: 4A EF 62 73 73 F4 E5 76 E5 Of
    6·1 answer
  • . Determine the state of stress at point A on the cross-section at section a-a of the cantilever beam. Show the results in a dif
    15·1 answer
  • Refrigerant-134a enters an adiabatic compressor at -30oC as a saturated vapor at a rate of 0.45 m3 /min and leaves at 900 kPa an
    13·1 answer
  • Can you screen record on WOW Presents Plus on iPhone?
    12·1 answer
  • Using your knowledge of how an ATM is used, develop a set of use cases that could serve as a basis for understanding the require
    15·1 answer
  • If the 2007 recession affected the green building materials market less seriously than other parts of the construction market, t
    12·2 answers
  • Write down about the water source selection criteria​
    9·1 answer
  • Five Safety for vernier height guage​
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!