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
Joseph wants to practice architecture. Which compulsory assessment administered by NCARB does he need to complete?
Hunter-Best [27]

Answer:

Architect Registration Examination (ARE)

Explanation:

In this scenario, Joseph wants to practice architecture. A compulsory assessment administered by National Council of Architectural Registration Boards (NCARB) which he has to complete is an Architect Registration Examination.

An Architect Registration Examination (ARE) refers to the professional licensure examination to be taken by anyone who intends to practice architecture in the United States of America, Puerto Rico, Guam, Canada, US Virgin Islands.

The main purpose of the Architect Registration Examination is to assess an architect's knowledge, skills, and abilities on architectural best practices, procedures and services. Also, it focuses on areas relating to a building's safety, soundness and health impact on the habitants. Therefore, ARE is a prerequisite for practicing architecture across the United States of America jurisdiction.

Once an architect passes the examination, he or she would be given a license to practice architecture.

<em>Hence, for Joseph to practice architecture he must take the Architect Registration Examination developed and administered by National Council of Architectural Registration Boards (NCARB). </em>

8 0
3 years ago
Discuss the applications of numerical weather forecasting​
olchik [2.2K]

Numerical weather prediction (NWP) uses mathematical models of the atmosphere and oceans to predict the weather based on current weather conditions. Though first attempted in the 1920s, it was not until the advent of computer simulation in the 1950s that numerical weather predictions produced realistic results. A number of global and regional forecast models are run in different countries worldwide, using current weather observations relayed from radiosondes, weather satellites and other observing systems as inputs.
3 0
3 years ago
A light bar AD is suspended from a cable BE and supports a 20-kg block at C. The ends A and D of the bar are in contact with fri
babymother [125]

Answer:

Tension in cable BE= 196.2 N

Reactions A and D both are  73.575 N

Explanation:

The free body diagram is as attached sketch. At equilibrium, sum of forces along y axis will be 0 hence

T_{BE}-W=0 hence

T_{BE}=W=20*9.81=196.2 N

Therefore, tension in the cable, T_{BE}=196.2 N

Taking moments about point A, with clockwise moments as positive while anticlockwise moments as negative then

196.2\times 0.125- 196.2\times 0.2+ D_x\times 0.2=0

24.525-39.24+0.2D_x=0

D_x=73.575 N

Similarly,

A_x-D_y=0

A_x=73.575 N

Therefore, both reactions at A and D are 73.575 N

7 0
3 years ago
Primary Creep: slope (creep rate) decreases with time
Igoryamba

Answer:

true

Explanation:

Creep is known as the time dependent deformation of structure due to constant load acting on the body.

Creep is generally seen at high temperature.

Due to creep the length of the structure increases which is not fit for serviceability purpose.

When time passes structure gain strength as the structure strength increases with time so creep tends to decrease.

When we talk about Creep rate for new structure the creep will be more than the old structure i.e. the creep rate decreases with time.

5 0
3 years ago
Basic concepts surrounding electrical circuitry?​
Elanso [62]
Hopefully that helps you out and is this for history or science?

3 0
2 years ago
Other questions:
  • A computer has a two-level cache. Suppose that 60% of the memory references hit on the first level cache, 35% hit on the second
    12·1 answer
  • An aluminium alloy bar of diameter 12.5 mm and length 27 m loaded in uniaxial tension to a force of 3 kN. Determine the length o
    15·1 answer
  • Explain why change is inevitable in complex systems and give examples (apart from prototyping and incremental delivery) of softw
    6·1 answer
  • When a user process is interrupted or causes a processor exception, the x86 hardware switches the stack pointer to a kernel stac
    13·1 answer
  • An air-conditioning system operates at a total pressure of 1 atm and consists of a heating section and a humidifier that supplie
    15·1 answer
  • A long rod of 60-mm diameter and thermophysical properties rho=8000 kg/m^3, c=500J/kgK, and k=50 W/mK is initally at a uniform t
    8·1 answer
  • A three-point bending test is performed on a glass specimen having a rectangular cross section of height 5.3 mm and width 11.6 m
    11·1 answer
  • A _______ contact allows current to flow when the switch's operator is not activated.?
    6·1 answer
  • How might a field like philosophy of history help scientists​
    14·1 answer
  • In the case of a collision causing property damage, injury, or death, you are required to ____
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!