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
Very thin films are usually deposited under vacuum conditions to prevent contamination and ensure that atoms can fly directly fr
katrin [286]

Answer:

a. 9947 m

b. 99476 times

c. 2*10^11 molecules

Explanation:

a) To find the mean free path of the air molecules you use the following formula:

\lambda=\frac{RT}{\sqrt{2}\pi d^2N_AP}

R: ideal gas constant = 8.3144 Pam^3/mol K

P: pressure = 1.5*10^{-6} Pa

T: temperature = 300K

N_A: Avogadros' constant = 2.022*10^{23}molecules/mol

d: diameter of the particle = 0.25nm=0.25*10^-9m

By replacing all these values you obtain:

\lambda=\frac{(8.3144 Pa m^3/mol K)(300K)}{\sqrt{2}\pi (0.25*10^{-9}m)^2(6.02*10^{23})(1.5*10^{-6}Pa)}=9947.62m

b) If we assume that the molecule, at the average, is at the center of the chamber, the times the molecule will collide is:

n_{collision}=\frac{9947.62m}{0.05m}\approx198952\  times

c) By using the equation of the ideal gases you obtain:

PV=NRT\\\\N=\frac{PV}{RT}=\frac{(1.5*10^{-6}Pa)(\frac{4}{3}\pi(0.05m)^3)}{(8.3144Pa\ m^3/mol\ K)(300K)}=3.14*10^{-13}mol\\\\n=(3.14*10^{-13})(6.02*10^{23})\ molecules\approx2*10^{11}\ molecules

5 0
2 years ago
ENERGIA
VMariaS [17]

nswer:

i dont understand french

97

Explanation:

4 0
2 years ago
Pointssss 100 and brainliest :)
Delvig [45]

Answer:

thank you for the free point have a great rest of your day

7 0
2 years ago
What's a disadvantage of highest MERV-rated filters?
Arte-miy333 [17]

Answer:

3) the pressure drop across high MERV filters is significant.

Explanation:

MERV (Minimum-Efficiency Reporting Value) is used to measure the efficiency of filter to remove particles. A filter of high MERV can filter smaller particles but this causes an increase in reduced air flow that is an increase in pressure drop. High MERV filters capture more particles causing them to get congested faster and thereby increasing pressure drop.

Excessive pressure drop can cause overheating and lead to damage of the filter. The pressure drop can be reduced by increasing the surface area of the filter.

3 0
3 years ago
Read 2 more answers
Jnjn freeeeeeeeeeeeeeeeeeeeeeeeeeeeeee pointtttttttttt
kvasek [131]

Answer:

thx

Explanation:

5 0
2 years ago
Read 2 more answers
Other questions:
  • An immersion heater has a resistance of 50Ω and carries a current of 2.5A current. What will be the final temperature of 500 g o
    11·1 answer
  • Methane gas at 25°C, 1 atm enters a reactor operating at steady-state and burns with 80% theoretical air entering at 227°C, 1 at
    10·1 answer
  • Suppose you are implementing a relational employee database, where the database is a list of tuples formed by the names, the pho
    14·1 answer
  • A 100 kmol/h stream that is 97 mole% carbon tetrachloride (CCL) and 3% carbon disulfide (CS2) is to be recovered from the bottom
    7·1 answer
  • What is a build enviroment in construction
    8·1 answer
  • If the resistance reading on a DMM'S meter face is to 22.5 ohms in the range selector switch is set to R X 100 range, what is th
    5·1 answer
  • Sadadasdasdasdasdadaaasd1
    14·1 answer
  • What is the difference between a natural and artificial diamond ​
    6·2 answers
  • Contrast moral and immoral creativity and innovation<br>​
    12·1 answer
  • Integrated circuits typically are mounted on ________, which are then plugged into the system board.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!