using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace _10_luk_sistemden_2_lik_sisteme_dönüştürme
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
int sayi,kalan;
string yazikalan="";
sayi=int.Parse(textBox1.Text);
while (sayi != 0)
{
kalan = sayi % 2;
sayi = sayi / 2;
yazikalan = kalan.ToString() + yazikalan;
}
label2.Text = yazikalan;
}
}
}
0 yorum:
Yorum Gönder