Why don't this makes a pyramid? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 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); } } }

13th Jul 2020, 5:47 PM
Prajanay Vyas
Prajanay Vyas - avatar
2 Answers
+ 1
My main concern is it goes in one line "M" and "s" is for my convenience
13th Jul 2020, 5:55 PM
Prajanay Vyas
Prajanay Vyas - avatar
0
Ya but how
14th Jul 2020, 2:33 AM
Prajanay Vyas
Prajanay Vyas - avatar