C
C#2y 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
mrmiyagiOP2y 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
Angius2y ago
uh This is a C# server
mrmiyagi
mrmiyagiOP2y ago
No description
Tvde1
Tvde12y ago
what's bTable? you probably want to reset bRange after you end the inner iteration
mrmiyagi
mrmiyagiOP2y ago
its a constant thats my problem
Tvde1
Tvde12y ago
move the line bRange:= 0 one down
mrmiyagi
mrmiyagiOP2y ago
Thanks pepepray
Tvde1
Tvde12y ago
I can now say I helped someone with their Pascal homework
Angius
Angius2y ago
Screenshot this thread, it's a once in a lifetime event that you see Pascal in the wild
Moods
Moods2y ago
Actually insane
mindhardt
mindhardt2y ago
You definetely know nothing about russian schools kekw
Ꜳåąɐȁặⱥᴀᴬ
one day i helped my sister with pascal
Accord
Accord2y 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.

Did you find this page helpful?