Engineering
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
}

answer
Answers: 2

Other questions on the subject: Engineering

image
Engineering, 04.07.2019 18:10, sarahgrindstaff123
Afluid flows with a velocity field given by v=(x/t)i.. determine the local and convective accelerations when x=3 and t=1.
Answers: 2
image
Engineering, 04.07.2019 18:20, RiverH246
Air flows over a heated plate àt a velocity of 50m/s. the local skin factor coefficient at a point on a plate is 0.004. estimate the local heat transfer coefficient at this point. the following property data for air are given: density = 0.88kg/m3 , viscosity 2.286 x 10 ^-5 kgm/s , k = 0.035w/mk ,cp = 1.001kj/kgk. use colburn reynolds analogy.
Answers: 1
image
Engineering, 04.07.2019 18:20, cxttiemsp021
Atank with constant volume contains 2.27 kg of a mixture of water phases (liquid-vapor). in the initial state the temperature and the quality are 127 °c and 0.6, respectively. the mixture is heated until the temperature of 160 oc is reached. illustrate the process in a t-v diagram. then, determine (1) the mass of the vapor in kg at the initial state, (2) the final pressure in kpa.
Answers: 3
image
Engineering, 04.07.2019 19:10, jrcspiderman2003
Asteel wire of 2 mm diameter is fixed between two points located 2 m apart. the tensile force in the wire is 250n, if its density of steel is given by 7830 kg/m3 the fundamental frequency of vibration hz? ?
Answers: 3
Do you know the correct answer?
Write a CPP program that prompts the user to enter the number of lines and generates the following p...

Questions in other subjects:

Konu
English, 18.07.2019 01:00