Ex2+T1+Question+2

Yesterday I found out this code. I want to know in general what it is used for. Also when trying to compile it there were several error. Find all the errors and correct the code so it can be used.

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 Question2 { public   partial   class   Form1  :  Form

{ int a; float b; Double d; String s; char c;

public Form1 { InitializeComponent; } private void button1_Click( object sender, EventArgs e) {

a = Int32 .Parse(textBox1. Text); b = float .Parse(Label1. Text); d = 0;

if (a>b) { d = a%b; }

if ( d==0 ){ textBox1.Text = "" + (d + b);}

else{

MessageBox.Show ( "No es..." +b);}

if(a==b){

MessageBox.Show ( "Obvio el número es..." );}

else{

MessageBox.Show ( "DUH, el problema con tus números es que..." );} } } }}

We think that this program could be used to determine the exact divisor numbers that variable a could have so that it gives as residuom cero. If the variables b do not fit with these characteristics, then a message box will appear and it will tell the user that that number isn't the one, so that he/she has to discard it and prove/search for another number. If number b is the same as number a, well, obviously as they are THE SAME number, they are always going to be divisible between them and we will obtain 1 as a result. And if none of the above conditions are met, then, we can assume that b is bigger than a, so they will never be exactly divisible.