//1)
begin
var Sum := 0;
var n := 0;
var Count := 0;
while Sum < 100 do
n += 1;
Sum += n;
Count += 1;
end;
Count -= 1;
Print('Count =', Count)
end.
//2)
var y:=0;
for var i:=1 to 4 do
y+=5*i*i;
y.Println;
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
//1)
begin
var Sum := 0;
var n := 0;
var Count := 0;
while Sum < 100 do
begin
n += 1;
Sum += n;
Count += 1;
end;
Count -= 1;
Print('Count =', Count)
end.
//2)
begin
var y:=0;
for var i:=1 to 4 do
y+=5*i*i;
y.Println;
end.