i am a beginner in programming and i have some Questions
about C# Codes
Now i am trying to Find the Minimum Value an an Array
and i used this Code and it doesnt work !
int i;
double min= x[0];
for(i=1;i<x.Length;i++)
{
if (x[i] < min)
{
min= x[i];
textBox10.Text = min.ToString();
}
}
return;
{
and i used this Code for the Average and doesn't work
int average = 0;
int i;
double sum = 0;
int temp;
for (i = 0; i < x.Length; i++)
sum += x[i];
{
average=(sum / x[i]);
textBox8.Text = average.ToString();
}
help me please !

New Topic/Question
Reply



MultiQuote




|