Facebook
From Kemil łŁL, 7 Months ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 452
  1. def rosnaca(tab):
  2.     for i in range(len(tab)):
  3.         j=len(tab)-2
  4.         while j>i:
  5.                 if tab[j]<tab[j-1]:
  6.                     pom=tab[j]
  7.                     tab[j]=tab[j-1]
  8.                     tab[j-1]=pom
  9.                 j-=1
  10.     return tab
  11.    
  12. ros=rosnaca(tab)
  13. print(ros)
  14.