S = Pi * R^2
На Pascal:
program Project;
var
sum: Integer;
i: Integer;
begin
sum:=0;
for i:=18 to 99 do
sum:=sum + (3.14 * i * i)
WriteLn("sum s = ", sum);
end.
На C:
#include "stdio.h"
main()
{
int sum = 0, i;
for(i = 18; i <= 99; i++)<br> sum = sum + (3.14 * i * i);
printf("Sum(S) = %i", sum);
}