C
C#8mo ago
MrMiyagi

❔ PASCAL While Statement

PROCEDURE DisplayBFTable(minA, maxA: INTEGER; VAR result: INTEGER);
VAR
bRange: INTEGER;
BEGIN
bRange:= 0;
WHILE minA <= maxA DO BEGIN
WHILE bRange <= bTable DO BEGIN
result:= Binomial(minA,bRange);
WriteLn('Ergibt: ', result);
bRange:= bRange + 1;
END;
minA:= minA + 1;
END;
END;
PROCEDURE DisplayBFTable(minA, maxA: INTEGER; VAR result: INTEGER);
VAR
bRange: INTEGER;
BEGIN
bRange:= 0;
WHILE minA <= maxA DO BEGIN
WHILE bRange <= bTable DO BEGIN
result:= Binomial(minA,bRange);
WriteLn('Ergibt: ', result);
bRange:= bRange + 1;
END;
minA:= minA + 1;
END;
END;
Thats my "Function" in Pascal
No description
No description
13 Replies
MrMiyagi
MrMiyagi8mo ago
The first one is my result, the second pic is how my result should look like. My Problem is that my while exits after it finishes the first row. Instead adding +1 to my minA and doing the whole thing again
Angius
Angius8mo ago
uh This is a C# server
MrMiyagi
MrMiyagi8mo ago
No description
Tvde1
Tvde18mo ago
what's bTable? you probably want to reset bRange after you end the inner iteration
MrMiyagi
MrMiyagi8mo ago
its a constant thats my problem
Tvde1
Tvde18mo ago
move the line bRange:= 0 one down
MrMiyagi
MrMiyagi8mo ago
Thanks pepepray
Tvde1
Tvde18mo ago
I can now say I helped someone with their Pascal homework
Angius
Angius8mo ago
Screenshot this thread, it's a once in a lifetime event that you see Pascal in the wild
Moods
Moods8mo ago
Actually insane
mindhardt
mindhardt8mo ago
You definetely know nothing about russian schools kekw
WEIRD FLEX
WEIRD FLEX8mo ago
one day i helped my sister with pascal
Accord
Accord8mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.