subject
Engineering, 10.03.2020 08:55 duttonsteven45

Write a CPP program that prompts the user to enter the number of lines and generates the following pattern of stars. If the nonnegative integer is 4, then the pattern generated is:


***
**
*
*
**
***

Also, write a program that prompts the user to enter the number of lines in the pattern and uses the recursive function to generate the pattern. For example, specifying 4 as the number of lines generates the above pattern.

main. cpp

#include
using namespace std;

void printStars(int lines);

int main()
{
// prompt the user to enter a number

// call printStars

return 0;
}

void printStars(int lines)
{
// write your star pattern function here
}

ansver
Answers: 2

Another question on Engineering

question
Engineering, 04.07.2019 18:10
What difference(s) did you notice using a pneumatic circuit over hydraulic circuit.explain why the pneumatic piston stumbles when it hits an obstacle.
Answers: 2
question
Engineering, 04.07.2019 18:10
Which from the following instrument is commonly used to detect the high pitch butzing sound in bearings? [clo4] a)-digital ultrasonic meter b)-infrared camera c)-spectroscopic d)-vibrometer
Answers: 2
question
Engineering, 04.07.2019 18:20
What is the heat treatment of metals? what is the benefit of it? why and how it's useful? answer in details, do not write by hand.
Answers: 3
question
Engineering, 04.07.2019 18:20
Along 8-cm diameter steam pipe whose external surface temperature is 900c connects two buildings. the pipe is exposed to ambient air at 70c with a wind speed of 50 km/hr blowing across the pipe. determine the heat loss from the pipe per unit length. (b) air at 500c enters a section of a rectangular duct (15 cm x 20 cm) at an average velocity of 7 m/s. if the walls of the duct are maintained at 100c. a) the length of the tube for an exit temperature of the air to be 40 0c. b)the rate of heat transfer from the air. c) the fan power needed to overcome the pressure drop in this section of the duct.
Answers: 1
You know the right answer?
Write a CPP program that prompts the user to enter the number of lines and generates the following p...
Questions
question
History, 22.05.2020 04:02
question
Mathematics, 22.05.2020 04:02
question
Mathematics, 22.05.2020 04:02
Questions on the website: 13722363