Kite Stars Program
After a long time not posting a blog, interesting information the more quiet, not what's important huftt now posting updates back to the C # program that will discuss a program star kite okay just to see the program below
using System;
using
System.Collections.Generic;
using System.Linq;
using System.Text;
namespace bintang
{
class Program
{
static void Main(string[]
args)
{
int
baris = 6;
int
tmp = 1;
Console.WriteLine("===========================");
Console.WriteLine("Bintange Fajar Hudy Pratama");
for
(int x = 1; x <= baris; x++)
{
for
(int i = baris; i >= x; i--)
{
Console.Out.Write(" ");
}
for
(int y = 1; y <= tmp; y++)
{
Console.Out.Write("*");
}
tmp += 2;
Console.Out.Write("\n");
}
tmp = 11;
for
(int x = 1; x <= baris; x++)
{
Console.Out.Write(" ");
for
(int i = 1; i <= x; i++)
{
Console.Out.Write(" ");
}
for
(int y = 1; y <= tmp - 2; y++)
{
Console.Out.Write("*");
}
tmp -= 2;
Console.Out.Write("\n");
}
Console.ReadKey();
}
}
}
0 comments:
Post a Comment