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
When an airplane is flying 200 mph at 5000-ft altitude in a standard atmosphere, the air velocity at a certain point on the wing
Alexandra [31]

Answer:

Pressure = P2=73.13 lbf/ft^2

Explanation:

The pressure is calculated by Bernoulli's equation.

P1+\frac{1}{2} dVi^2=P2+\frac{1}{2} dVf^2\\

Solving it for P2

P2=P1 +\frac{1}{2} d(Vi^2-Vf^2)

Now inserting values

P1 = 0 as it is given that initial point is at atmospheric point.

d= density = 2.05 sl/ft3

Vi = 200 mph = 293.33 ft/s

Vf = 273 mph = 400.4 ft/s

Putting these values

P2 = 0 + 0.5* 2.05(293.33^2-400.4^2)\\P2=-76sl/ft.s^2

Changing the units to pounds per square foot

P2=73.13 lbf/ft^2

7 0
4 years ago
Determine whether or not each of the following signals is periodic.
Sloan [31]

Answer:

a) periodic (N = 1)

b) not periodic

c) not periodic

d) periodic (N = 8)

e) periodic (N = 16)

Explanation:

For function to be a periodic: f(n) = f(n+N)

a) x[n]=sin(\frac{8\pi}{2}n+1)\\\\sin(\frac{8\pi}{2}n+1)=sin(4\pi n+1)

It is periodic with fundamental period N = 1

b) x[n]=cos(\frac{n}{8} -\pi)\\\\\frac{1}{8} N=2\pi k

N must be integer. So it is nor periodic

c) x[n]=cos(\frac{\pi}{8} n^2)\\\\cos(\frac{\pi}{8} (n+N)^2)=cos(\frac{\pi}{8} (n^2+N^2+2nN)\\\\N^2 = 16 \:\:or\:\:2nN=16

Since N is dependent to n. So it is not periodic.

d) x[n]=cos(\frac{\pi }{2}  n) cos(\frac{\pi }{4}  n)\\\\x[n] = \frac{1}{2} cos(\frac{3\pi }{4} n) + \frac{1}{2} cos(\frac{\pi }{4} n)\\\\N_1=8\:\:and\:\:N_2=8\\

So it is periodic with fundamental period N = 8.

e) x[n]=2cos(\frac{\pi }{4}  n)+sin(\frac{\pi }{8} n)-2cos(\frac{\pi }{2} n+\frac{\pi }{6} )\\\\N_1=8\:\:and\:\:N_2=16\:\:and\:\:N_3=4

So it is periodic with N = 16.

3 0
3 years ago
This is an essential safety procedure that protects workers from injury while working on or near electrical circuits and equipme
Mice21 [21]

Answer:

Option B

Lockout/ Tagout

Explanation:

lockout and tagout is a safety procedure used in most industries and work places. This ensures that during any maintenance work, that dangerous machines are properly shut off and not able to be started up again prior to the completion of maintenance or repair work.

The procedure includes:

1. Turns off and disconnects the machinery or equipment from its energy source(s) before performing service or maintenance.

2. The authorized employee(s) either lock or tag the energy-isolating device(s) to prevent the release of hazardous energy.

8 0
4 years ago
How many robots does bailey nursery own ​
givi [52]

Answer:

The Bailey family has flourished during its business’ 110-year history. But Bailey Nurseries’ leaders still operate with the belief that the family doesn’t always know best. The company has grown from a one-man operation selling fruit trees and ornamental shrubs to one of the largest wholesale nurseries in the United States, thanks to insights from those who are family and those who aren’t.

“For a business to thrive, you have to ask for outside help,” says Terri McEnaney, president of the Newport-based company and a fourth-generation family member. “We get an outside perspective through family business programs, advisors and our board, because you can get a bit ingrained in your own way of thinking.”

When Bailey Nurseries chose its current leader in 2000, it brought in a facilitator who gathered insights from key employees, board members and owners. Third-generation leaders (and brothers) Gordie and Rod Bailey picked Rod’s daughter McEnaney, who had experience both inside and outside the company.

Explanation:

5 0
3 years ago
Dowry practice is considered to be a social problem . justify<br>​
Artemon [7]

Answer:

mark me brailinist

Explanation:

Dowry is a social evil in the society, that has caused unimaginable tortures and crimes towards women. The evil has taken lives of women from all stratas of society - be it poor, middle class or the rich. However it is the poor who succumb and fall prey to it, more due to their lack of awareness and education.

It is because of the dowry system, that daughters are not valued as much as the sons. In the society, many a times it has been seen that they are seen as a liability and are often subjected to subjugation and are given second hand treatment may it be in education or other amenities.

Today the government has come up with many laws and reforms, not only to eradicate the dowry system, but also to uplift the status of the girl child by bringing in many schemes.

It is now for the society at large to become aware and understand the situation. It up to all of us to take active steps in bringing about the necessary change and stop either giving or taking dowry. We must all know that we should start valuing our daughters first, so that others know their value once they grow up.

7 0
2 years ago
Other questions:
  • The 150-lb man sits in the center of the boat, which has a uniform width and a weight per linear foot of 3 lb&gt;ft. Determine t
    9·1 answer
  • A 15. μF capacitor is connected to a 50. V battery and becomes fully charged. The battery is removed and a slab of dielectric th
    10·1 answer
  • Timken rates its bearings for 3000 hours at 500 rev/min. Determine the catalog rating for a ball bearing running for 10000 hours
    7·1 answer
  • Ighihrhffhnyhdytyfntvbjntiytkufbyuygyh
    5·2 answers
  • Sinks must be used for the correct intended purpose to prevent
    7·1 answer
  • Please help and thank u so much
    6·1 answer
  • Engineers are problem who use critical thinking to create new solutions.
    13·1 answer
  • One end of a___ is tapered to a dull point and is used to align larger holes such as
    10·1 answer
  • Select the appropriate SDLC process model to develop the VHROM system.
    15·1 answer
  • A 10 kg mass is lifted to a height of 2 m What is the potiental energy at this position
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!