PL/SQL for for loop numbers multiplication
AyhamOct 2 2012 — edited Oct 2 2012hi All,
i have five numbers (from 1 to 5) i want to multiple each number with others six times but not with it's self.
that mean can not multiples 2*2 or 3*3 and so on
declare
begin
for i in 1..5 loop
for j in 1..5 loop
dbms_output.put_line(to_char(i) ||'*'||to_char(j));
end loop;
end loop;
end;
/
i want the output same the follwoing: Multiple each number with other numbers six time by sequential way.
1*2
1*2
1*2
1*2
1*2
1*2
1*3
1*3
1*3
1*3
1*3
1*3
1*4
1*4
1*4
1*4
1*4
1*4
1*5
1*5
1*5
1*5
1*5
1*5
2*3
2*3
2*3
2*3
2*3
2*3
2*4
2*4
2*4
2*4
2*4
2*4
2*5
2*5
2*5
2*5
2*5
2*5
3*4
3*4
3*4
3*4
3*4
3*4
3*5
3*5
3*5
3*5
3*5
3*5
4*5
4*5
4*5
4*5
4*5
4*5
regards