blob: abd3e8335cabe8b9ec5f51f66ab7615f73ee4fd3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
{ Nested Loops }
program nestedloop;
uses SysUtils;
var n, a, b, c, d, e, f : integer;
var x : longint;
begin
if ParamCount = 0 then
n := 1
else
n := StrToInt(ParamStr(1));
if n < 1 then n := 1;
x := 0;
For a := 1 to n Do
For b := 1 to n Do
For c := 1 to n Do
For d := 1 to n Do
For e := 1 to n Do
For f := 1 to n Do
Inc(x);
WriteLn( IntToStr(x) );
end.
|