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
What are the conditions for sheet generator to build up its voltage?
MA_775_DIABLO [31]

Answer:

There are six conditions

1. Poles should contain some residual flux.

2. Field and armature winding must be correctly connected so that initial mmm adds residual flux.

3. Resistance of field winding must be less than critical resistance.

4. Speed of prime mover of generator must be above critical speed.

5. Generator must be on load.

6. Brushes must have proper contact with commutators.

Explanation:

3 0
2 years ago
PLS HELP!!!
Advocard [28]

Answer:

I would say C

Explanation:

let me know if im right

3 0
1 year ago
Read 2 more answers
A car accelerates from O to 60. miles per hour in 5.2 seconds. Calculate acceleration in m/s seconds. Calculate acceleration in
DochEvi [55]

Answer:

a=5.515\frac{m}{s^{2} }

Explanation:

The first thing we will do is convert the units. Miles per hour to meters per second.

1 mile=1609.34 mts.

1 hora=3600 segundos

Performing the operations

60\frac{mile}{h}=\frac{(60*1609.34)}{3600}\frac{m}{s}=26.822\frac{m}{s}

Now, we will use the acceleration formula

a=\frac{v}{t}

Where v = speed and t = time

Substituting the values ​​of t=5.2s

a=\frac{v}{t} =\frac{26.822\frac{m}{s} }{5.2s} =5.15\frac{m}{s^{2} }

7 0
3 years ago
What precautions should be taken to avoid the overloading of domestic electric circuits.
madam [21]

The precautions that should be taken to avoid the overloading of domestic electric circuits are:

  1. Do not put high voltage wires in one socket.
  2. Do not use many electric appliances of high power at the same time.
<h3>What are electric circuits?</h3>

Electric circuits are wires or devices that give electricity to devices that run on electricity. Running of electric devices should be done carefully because our body can come in contact with the current.

Thus, the precautions are to keep high voltage lines away from one socket. Use only a few high-power electric appliances at once.

To learn more about electric circuits, refer to the below link:

brainly.com/question/28221759

#SPJ4

4 0
1 year ago
An elevation is.... * 10 points a. A detailed description of requirements, composition and materials for a proposed building. b.
Savatey [412]

Answer:

b. A view of a building seen from one side, a flat representation of one façade. This is the most common view used to describe the external appearance of a building.

Explanation:

An elevation is a three-dimensional, orthographic, architectural projection that reveals just a side of the building. It is represented with diagrams and shadows are used to create the effect of a three-dimensional image.

It reveals the position of the building from ground-depth and only the outer parts of the structure are illustrated. Elevations, building plans, and section drawings are always drawn together by the architects.

3 0
3 years ago
Other questions:
  • a. A crude oil pipe’s radius is reduced by 5%. What is the corresponding percentage change in the pressure drop per unit length?
    8·1 answer
  • A surveyor is trying to find the height of a hill . he/she takes a sight on the top of the hill and find that the angle of eleva
    12·1 answer
  • Which of the following is a common use for commas?
    6·2 answers
  • How many types of engineering specialist are there?
    14·1 answer
  • The assignment is to modify the class implementation without changing the functionality. Remove the feet and inches data members
    6·1 answer
  • For unrestrained cube made from linear, isotropic, homogeneous material the temperature increase causes strain in_____ direction
    11·1 answer
  • Given a 12-bit A/D converter operating over a voltage range from ????5 V to 5 V, how much does the input voltage have to change,
    13·1 answer
  • The minimum recommended standards for the operating system, processor, primary memory (RAM), and storage capacity for certain so
    12·2 answers
  • Situation: Peter is designing a new hybrid car that functions on solar power. He is currently working on sketches of his design
    7·1 answer
  • He is going ___ in the hot air ballon​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!