You are on page 1of 2

Source code :

using
using
using
using
using
using
using
using
using

System;
System.Collections.Generic;
System.ComponentModel;
System.Data;
System.Drawing;
System.Linq;
System.Text;
System.Threading.Tasks;
System.Windows.Forms;

namespace Mc_Culloh_Pits
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
int a, b;
a = 1;
b = 0;
if (radioButton1.Checked)
{
if (radioButton4.Checked && radioButton6.Checked)
{
textBox2.Text = b.ToString();
}
else
{
textBox2.Text = a.ToString();
}
}
if (radioButton2.Checked)
{
if (radioButton5.Checked && radioButton7.Checked)
{
textBox2.Text = a.ToString();
}
else
{
textBox2.Text = b.ToString();
}
}
if (radioButton3.Checked)
{

if (radioButton4.Checked && radioButton6.Checked || radioButton5.Checked &&


radioButton7.Checked)
{
textBox2.Text = b.ToString();
}
else
{
textBox2.Text = a.ToString();
}
}
}
private void radioButton1_CheckedChanged(object sender, EventArgs e)
{
radioButton1.Enabled = true;
radioButton2.Enabled = true;
radioButton3.Enabled = true;
textBox1.Text = "OR";
}
private void radioButton2_CheckedChanged(object sender, EventArgs e)
{
textBox1.Text = "AND";
}
private void radioButton3_CheckedChanged(object sender, EventArgs e)
{
textBox1.Text = "XOR";
}

}
}

private void button2_Click(object sender, EventArgs e)


{
this.Close();
}

You might also like