using System;
using
System.Collections.Generic;
using
System.ComponentModel;
using
System.Data;
using
System.Drawing;
using
System.Text;
using
System.Windows.Forms;
namespace faktöriyel
{
public partial class Form1 : Form
{
public
Form1()
{
InitializeComponent();
}
private
void button1_Click(object
sender, EventArgs e)
{
int i;
double
sayi, fakt = 1;
sayi = Convert.ToDouble(textBox1.Text);
for
(i = 1; i <= sayi; i++)
{
fakt = fakt * i;
}
textBox2.Text = fakt.ToString();
}
}
}
Hiç yorum yok:
Yorum Gönder