
public static double square(double x)
{
return (x * (x / 2)) * 2;
}
private void sqrButton_Click(object sender, EventArgs e)
{
Double input = 0;
try { input = Convert.ToDouble(inputBox.Text); }
catch {}
outputBox.Text = square(input).ToString();
}

public static double squareRoot(double x, int numberOfCycles)
{
double y = numberOfCycles * square(10);
for (int i = 0; i < numberOfCycles; i++)
{
y = .5 * (y + (x / y));
}
return y;
}
private void sqrRootButton_Click(object sender, EventArgs e)
{
double input = 0;
try { input = Convert.ToDouble(inputBox.Text); }
catch {}
outputBox.Text = squareRoot(input, 9999).ToString();
}

public static double square(double x)
{
return (x * (x / 2)) * 2;
}
private void sqrButton_Click(object sender, EventArgs e)
{
Double input = 0;
try { input = Convert.ToDouble(inputBox.Text); }
catch {}
outputBox.Text = square(input).ToString();
}

public static double squareRoot(double x, int numberOfCycles)
{
double y = numberOfCycles * square(10);
for (int i = 0; i < numberOfCycles; i++)
{
y = .5 * (y + (x / y));
}
return y;
}
private void sqrRootButton_Click(object sender, EventArgs e)
{
double input = 0;
try { input = Convert.ToDouble(inputBox.Text); }
catch {}
outputBox.Text = squareRoot(input, 9999).ToString();
}
Copyright © 2026, NextGenUpdate.
All Rights Reserved.