Pass the Textbox Text into the function and It will Print all the SqureRoot of the Numbers
private void squreRootFinder(string textBox)
{
string[] numbers = textBox.Split('\n');
string data = "";
for (int i = 0; i < numbers.Length; i++)
{
data += Math.Sqrt(Convert.ToInt32(numbers[i])) + " ";
}
MessageBox.Show(data);
}
2
solved calculating multi squares in one textbox in C# [closed]