Skip to content

Instantly share code, notes, and snippets.

@Titory0
Created January 17, 2023 12:09
Show Gist options
  • Save Titory0/cf4f3a5eca98feb819c3e2d77b8c812b to your computer and use it in GitHub Desktop.
Save Titory0/cf4f3a5eca98feb819c3e2d77b8c812b to your computer and use it in GitHub Desktop.
public static int[] ft_rev_square_int_tab(int[] tab)
{
int aconserver;
for(int i=0;i<(tab.Length);i++)
{
int count=1;
foreach(int element in tab)
{
if(count!=tab.Length)
{
if(element <tab[count])
{
aconserver=tab[count];
tab[count]=element;
tab[count-1]=aconserver;
}
}
count+=1;
}
}
for(int y=0;y<tab.Length;y++)
{
tab[y]=tab[y]*tab[y];
}
return tab;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment