Can someone please explain this piece of code for me, I am a beginner and I couldn't understand the For Loop here, This code can arrange the numbers from smallest to largest.
int a = Convert.ToInt32(Console.ReadLine()); int b = Convert.ToInt32(Console.ReadLine()); int c = Convert.ToInt32(Console.ReadLine()); int d = Convert.ToInt32(Console.ReadLine()); int [] sayilarr ={a,b,c,d}; Array.Sort(sayilarr); string ss = ""; for (int i = 0; i < 4; i++) { ss += sayilarr[i]; } Console.WriteLine(ss);
Array.Sort(sayilarr);Statement, not withforloop.