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
Ayo, how do I change my username on here?
nydimaria [60]

Answer:

I'm not sure

Explanation:

eeeeeeeeeeeeeeeeeeeeeee

4 0
4 years ago
Just some random stufff
NeTakaya

Answer:

Nice!

Explanation:

5 0
3 years ago
How can I draw this image in 2D form
Ket [755]

Answer:

no it is not 2D

Explanation:

it is 3D

ok so follow these steps

- make hole

-make square

-make triangle

ok now your figure is ready

5 0
3 years ago
A 1-w, 350-ω resistor is connected to 24 v. Is this resistor operating within its power rating?
seraphim [82]

Answer:

No.

Explanation:

P_r = Power rating = 1 W

R = Resistance = 350\ \Omega

V = Voltage = 24\ \text{V}

Power is given by

P=\dfrac{V^2}{R}\\\Rightarrow P=\dfrac{24^2}{350}\\\Rightarrow P=1.65\ \text{W}

1.65\ \text{W}>1\ \text{W}

So

P>P_r

Hence, the resistor is not operating within its power rating.

8 0
3 years ago
What is the first step necessary for initiating the visual transduction cascade in rods?.
irinina [24]

'Capturing a photon by<em> isomerization and rhodopsin </em>of retinal' is the first step necessary for initiating the visual transduction cascade in rods.

Visual transduction refers to the process in the eye where absorption of light in the 'retina' is translated into electrical signals that then reach the brain. It is correct to state that visual transduction is the photochemical reaction that takes place when light or photon is converted to an electric signal in the retina. The visual pigment in the rods, called rhodopsin, is a membrane protein placed in the outer segments of the rods.

When initiating the visual transduction cascade in rods the first vital step is to capture a photon by<em> isomerization and rhodopsin</em> of retinal'.

You can leran more about visual transduction at

brainly.com/question/13798113

#SPJ4

4 0
1 year ago
Other questions:
  • A Si sample contains 1016 cm-3 In acceptor atoms and a certain number of shallow donors, the In acceptor level is 0.16 eV above
    5·2 answers
  • A shift register is a synchronous sequential circuit that will store or move data. It consists of several flip-flops, which are
    11·1 answer
  • Ignore swell and shrinkage for this problem.
    5·1 answer
  • Suppose there are 76 packets entering a queue at the same time. Each packet is of size 5 MiB. The link transmission rate is 2.1
    5·1 answer
  • A specimen of some metal having a rectangular cross section 10.4 mm × 12.8 mm is pulled in tension with a force of 15900 N, whic
    6·1 answer
  • Two engineers are to solve an actual heat transfer problem in a manufacturing facility. Engineer A makes the necessary simplifyi
    14·1 answer
  • 2. Ang sangay na nagbibigay-kahulugan sa mga batas ng bansane
    8·1 answer
  • A(n)<br> is a safety device commonly<br> used with a slotted nut.
    14·1 answer
  • Need help, I will give cake :))<br><br> + branliest
    14·2 answers
  • For the following circuit diagram, if A=010 , B= 101.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!