Question: ANSWER NEEDED IN C# 1. Create a new function called DisplayTree, it should have 1 integer parameter, and it returns no value. 2. The function

ANSWER NEEDED IN C#

1. Create a new function called DisplayTree, it should have 1 integer parameter, and it returns no value. 2. The function should print out a tree similar to the one below: * ** *** **** 3. The parameter represents the height of the tree. 4. If the parameter is less than 1, then display Error: Invalid Parameter for DisplayTree() 5. Call this function from your main method to test it. a. Can you display a tree with a height of 5? 20? 1? 0? -1? -5? b. Leave a comment stating if your test was successful, and if you got the behavior from your program that you expected.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!