My question is how to make a pyramid using * and \'space\' in C#? The output will be like this.
* * * * * * * * * * * * * * *
I know it's javascript but might help
let n = 6; for (let i = 1; i <= n; i++) { let spaces = n-i; let str = ''; for (let j=0; j < spaces; j++) { str+=' '; } for (let j=0; j < i; j++) { str+='* '; } console.log(str) }