using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication2
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void
button1_Click(object sender, EventArgs e)
{
int sayi1, sayi2, okek, x;
if (Convert.ToInt32(textBox1.Text)
> Convert.ToInt32(textBox2.Text))
{
x = Convert.ToInt32(textBox2.Text);
}
else
{
x = Convert.ToInt32(textBox1.Text);
}
for (; Convert.ToInt32(textBox1.Text)
% x != 0 || Convert.ToInt32(textBox2.Text) %
x != 0; )
{
x--;
}
textBox3.Text = Convert.ToString(x);
okek = (Convert.ToInt32(textBox1.Text)
* Convert.ToInt32(textBox2.Text)) / x;
textBox4.Text = Convert.ToString(okek);
}
private void
button2_Click(object sender, EventArgs e)
{
textBox1.Clear();
textBox2.Clear();
textBox3.Clear();
textBox4.Clear();
}
private void
button3_Click(object sender, EventArgs e)
{
textBox1.Text = "Bu Program";
textBox2.Text = "Kerem Kılıç ve";
textBox3.Text = "Ramazan Bulat'a";
textBox4.Text = "Aittir";
}
}}
Hiç yorum yok:
Yorum Gönder