Diberdayakan oleh Blogger.
RSS

4.faktorial

using System;

namespace faktorial_0320100019
{
///


/// Summary description for Class1.
///

class Class1
{
///
/// The main entry point for the application.
///

[STAThread]
static void Main(string[] args)
{
int a,b;
long c;
c = 1;
Console.Write("Input Angka : ");
a = Convert.ToInt32(Console.ReadLine());
for(b=1;b<=a;b++)
{
c = c * b;
}
Console.WriteLine("\n\nNilai Faktorial Dari {0} adalah {1}",a,c);
Console.ReadLine();
}
}
}

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

0 komentar:

Posting Komentar