> 
> Ermittelung der grössten Zahl:
> 
> int a,b,c,d,e,f;
> 
> int max = int.MinValue;
> 
> if (a>max) max=a;
> if (b>max) max=b;
> if (c>max) max=c;
> if (d>max) max=d;
> if (e>max) max=e;
> if (f>max) max=f;
> 
> Wenn Dich nicht der Wert interessiert, sondern welche 
> Variable es ist, dann
> kannst Du Dir zusätzlich beim setzen des max-Wertes die 
> Variable merken...
> 

Wenns Dir eh nur um den Wert geht, geht auch das:

int max = Math.Max(Math.Max(Math.Max(Math.Max(Math.Max(a,b),c),d),e),f);


Claudius

_______________________________________________
Asp.net Mailingliste, Postings senden an:
Asp.net@glengamoi.com
An-/Abmeldung und Suchfunktion unter:
http://www.glengamoi.com/mailman/listinfo/asp.net

Antwort per Email an