ده الكود
int item,loc,i,j,k;
loc = -1;
int[] A = { 1, 2, 3, 4, 5, 6 };
Console.WriteLine("plz enter the item you want to insert");
item=Int32.Parse(Console.ReadLine());
for(i=0;i<A.Length;i++)
{
if (A>item)
{
loc=i;
break;
}
}
if (loc!=-1)
{
for(j=A.Length;j>loc;j--)
{
A[j]=A[j-1];
A[loc]=item;
}
for(k=0;k<A.Length;k++)
Console.WriteLine(A[k]);يا ريت لو محتاج اي تعديل لانه مش شغال معايا خالص
وشكرا مقدما