السلام عليكم ورحمة الله وبركاته
Program prints the form of a half stars
c# - c sharp
الوصف :
كود يقوم بطباعة النجوم على شكل نصف ماسه بإستخدام for loop مثل
Program prints the form of a half stars
c# - c sharp
الوصف :
كود يقوم بطباعة النجوم على شكل نصف ماسه بإستخدام for loop مثل
- الكود:
Console.WriteLine("Half of Daimond Stars");//gooree tabuk
//Ascending part
for (int i = 0; i < 6; i++)//number of lines
{
for (int j = 0; j < i; j++)//increasing
Console.Write("*");
Console.WriteLine("");
}
//Descending part
for (int i = 0; i < 6; i++)//number of lines
{
for (int j = 6; j > i; j--)//descreasing
Console.Write("*");
Console.WriteLine("");
}