+ 1
Why don't this makes a pyramid?
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SoloLearn { class Program { static void makepyramid(int rows){ for(int z=1; z<=rows;z++){ for(int i=1;i<=z;i++ ){ Console.WriteLine("M"); } { for(int s=1;s<=2*z-1;s++){ Console.WriteLine("*"+"s");}} {}}} static void Main(string[] args) { makepyramid(3); } } }
2 Answers
+ 1
My main concern is it goes in one line "M" and "s" is for my convenience
0
Ya but how