// F# open System [<EntryPoint>] let main argv = let mutable sum = 0 let mutable i = 0 let array = [19..51] while i < array.Length do let value = array.Item i if 5 % value = 0 then sum <- sum + value i <- i+1 Console.WriteLine sum Console.ReadKey true |> ignore 0
// Pascal (for) var sum : integer; i: integer; begin sum := 0; i := 0; for i:=19 to 51 do begin if i mod 5 = 0 then sum := sum + i; end; writeln(sum); end.
// Pascal var sum : integer; i: integer; begin sum := 0; i := 19; while (i <= 51) do begin if i mod 5 = 0 then sum := sum + i; i := i + 1; end; writeln(sum); end.
Biography for the Dnieper - a series of interconnected strategic operations of the Great Patriotic War, conducted by the Armed Forces of the USSR, in the second part of 1943 on the banks of the Dnieper.
Participation in it should be up to 4 million people, and the distance to it is 750 kilometers. As a result of the four-month operation, Left-Bank Ukraine was almost completely liberated. During the operation, significant forces of the Red Army crossed the river, created several strategic bridgeheads on the right bank of the river, which also liberated the city of Kiev. The battle for the Dnieper has become one of the participants in the battles in world history.
open System
[<EntryPoint>]
let main argv =
let mutable sum = 0
let mutable i = 0
let array = [19..51]
while i < array.Length do
let value = array.Item i
if 5 % value = 0 then
sum <- sum + value
i <- i+1
Console.WriteLine sum
Console.ReadKey true |> ignore
0
// Pascal (for)
var sum : integer;
i: integer;
begin
sum := 0;
i := 0;
for i:=19 to 51 do
begin
if i mod 5 = 0 then
sum := sum + i;
end;
writeln(sum);
end.
// Pascal
var sum : integer;
i: integer;
begin
sum := 0;
i := 19;
while (i <= 51) do
begin
if i mod 5 = 0 then
sum := sum + i;
i := i + 1;
end;
writeln(sum);
end.
Объяснение:
Biography for the Dnieper - a series of interconnected strategic operations of the Great Patriotic War, conducted by the Armed Forces of the USSR, in the second part of 1943 on the banks of the Dnieper.
Participation in it should be up to 4 million people, and the distance to it is 750 kilometers. As a result of the four-month operation, Left-Bank Ukraine was almost completely liberated. During the operation, significant forces of the Red Army crossed the river, created several strategic bridgeheads on the right bank of the river, which also liberated the city of Kiev. The battle for the Dnieper has become one of the participants in the battles in world history.