各位版友好,
想請教以下情景如何使用遞迴輸出...
有3個list如下,
List1=["A","B","C","D","E"]
List2=[1,2,3,4,5]
List3=["X","Y"]
想透過遞迴輸出成以下格式,
A 1 X
B 1 X
C 1 X
D 1 X
E 1 X
A 2 X
B 1 X
C 1 X
D 1 X
E 1 X
A 3 X
B 1 X
C 1 X
D 1 X
E 1 X
A 4 X
B 1 X
C 1 X
D 1 X
E 1 X
A 5 X
B 1 X
C 1 X
D 1 X
E 1 X
A 1 X
B 2 X
C 1 X
D 1 X
E 1 X
A 2 X
B 2 X
C 1 X
D 1 X
E 1 X
A 3 X
B 2 X
C 1 X
D 1 X
E 1 X
...
A 5 X
B 5 X
C 5 X
D 5 X
E 5 X
A 1 Y
B 1 X
C 1 X
D 1 X
E 1 X
A 2 Y
B 1 X
C 1 X
D 1 X
E 1 X
...
A 5 Y
B 5 X
C 5 X
D 5 X
E 5 X
A 1 X
B 1 Y
C 1 X
D 1 X
E 1 X
A 2 X
B 1 Y
C 1 X
D 1 X
E 1 X
...
A 5 X
B 5 Y
C 5 X
D 5 X
E 5 X
A 1 Y
B 1 Y
C 1 X
D 1 X
E 1 X
A 2 Y
B 1 Y
C 1 X
D 1 X
E 1 X
...
A 5 Y
B 5 Y
C 5 Y
D 5 Y
E 5 Y
請問該如何使用遞迴輸出?