اصدقائي هذا البرنامج يقوم بطباعة ناتج ضرب الاعداد الفردية بين 1-15 بلغة الـ C# ويمكن لمن لديه المعرفة البسطة بحلقات فور ان يعدله ليصبح بين العدد الذي يريد ولاي مساعدة مراسلتي برسالة خاصة
[B]
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace quse___02._._._._2_4_2012
{
class Program
{
static void Main(string[] args)
{
// write a program in c# that prints the product for odd numbers from (1) to (15) .
Console.WriteLine("
the product for odd numbers from (1) to (15) .
");
Console.WriteLine("
by;- saif GaRa
");
Console.WriteLine("
***********************************************
");
int i, a = 1 ;
Console.Write(" the odd numbers are :
");
for (i = 0; i <= 15; i++)
{
if (i % 2 == 1)
{
Console.WriteLine("
: {0} ", i);
Console.WriteLine("
****S****");
a = i * a ;
}
}
Console.WriteLine("
the product number is : {0}
", a);
Console.WriteLine("
***********************************************
");
Console.WriteLine("
>> thanx <<
");
}
}
}[/b]
تحياتي اصدقائي