Sunday, August 2, 2009

Write a C++ program to print a triangle composed of a symbol.?

Write a C++ program to print a triangle composed of a symbol. The number of lines and the symbol should be entered as input from the keyboard. For example, if the input values are * and 7, the output is as follows:








Do you wish to continue? (y = yes, n = no): y





Enter the symbol to be used to draw the triangle: *


How many lines do you want the triangle to be? 7





*


***


*****


*******


*********


***********


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





Thank you for using this program.











(The triangle really isnt a right triangle it should be a normal one but it doesnt show up right here.)

Write a C++ program to print a triangle composed of a symbol.?
Do you have a specific question or just wanting someone to do you homework?

umbrella plant

No comments:

Post a Comment