1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
using System; class Program { static void Main() { Console.Write(“Sayı Giriniz:”); int a = int.Parse(Console.ReadLine()); int sonuc = 1; for (int i = a; i > 0; i- -) // i – – YAZARAK BİRER BİRER ARTTIRMADIK BU SEFER AZALTTIK. { sonuc = sonuc * i; } Console.WriteLine(sonuc); } } |