twitter Console Application for creating star pyramid using C# code stumbleupon Console Application for creating star pyramid using C# codedigg Console Application for creating star pyramid using C# code
3707048291 7158988ea5 m Console Application for creating star pyramid using C# code
by uosɐɾ McArthur

// Console Application for creating star pyramid using C# code

// For value of 4

//               *

//              * *

//             * * *

//            * * * *

using System;

namespace STAR

{

class Class1

{

static void Main()

{

   Console.WriteLine(“Enter the value “);

int k=int.Parse(Console.ReadLine());

int n=k-1;

int x=2*(k-1)+1;

for(int p=0;p

{

for(int j=k-1;j>=0;j–)

{

Console.Write(” “);

}

for(int i=0;i

{

if(i%2==1)

{

Console.Write(“*”);

}

else

{

Console.Write(” “);

}

}

Console.WriteLine();

k–;

   }

Console.ReadLine();

}

}

}

Written by xxris







More posts from us

Other links you might like


Incoming search terms: