迴圈練習
有四個數字,如何組成三個不重覆的數字
先把三個位子的數字都個別印出來
最後加個避免重覆的判斷
for a in range(1,5):
for b in range(1,5):
for c in range(1,5):
if (a != c) and (a != b) and (b != c):
print (a,b,c)
迴圈練習
有四個數字,如何組成三個不重覆的數字
先把三個位子的數字都個別印出來
最後加個避免重覆的判斷
for a in range(1,5):
for b in range(1,5):
for c in range(1,5):
if (a != c) and (a != b) and (b != c):
print (a,b,c)