Ask Question
31 August, 23:15

Write a function named printtriangle that receives a parameter that holds a non-negative integer value and prints a triangle of asterisks as follows: first a line of n asterisks, followed by a line of n-1 askterisks, and then a line of n-2 asterisks, and so on.

+4
Answers (1)
  1. 31 August, 23:35
    0
    Static void PrintTriangle (int n) { for (; n>0; n--) { Console. WriteLine (new String ('*', n)); }}
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Write a function named printtriangle that receives a parameter that holds a non-negative integer value and prints a triangle of asterisks ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers