Program TaskC;
Var i, il: Integer;
Begin
For i := 1 To 21 Do
If i Mod 2 = 1 Then
Write(i, ' ');
i := i + 1;
End;
ReadLn;
End.
Program TaskD;
Var i: Integer;
For i := 1 To 11 Do
Write(i * 2, ' ');
Program TaskE;
For i := 10 DownTo 1 Do
Program TaskF;
Write(i * 10, ' ');
Program TaskG;
Var i, sum: Integer;
For i := 1 To 10 Do
sum := sum + i;
WriteLn(sum);
Program TaskH;
Var i, product: Integer;
product := 1;
For i := 1 To 5 Do
product := product * i;
WriteLn(product);
Program TaskI;
For i := -5 To 5 Do
sum := sum + Abs(i);
Program TaskJ;
Var c: Char;
For c := 'A' To 'Z' Do
Write(c, ' ');
Объяснение:
Program TaskC;
Var i, il: Integer;
Begin
For i := 1 To 21 Do
If i Mod 2 = 1 Then
Write(i, ' ');
i := i + 1;
End;
ReadLn;
End.
Program TaskD;
Var i: Integer;
Begin
For i := 1 To 11 Do
Write(i * 2, ' ');
End;
ReadLn;
End.
Program TaskE;
Var i: Integer;
Begin
For i := 10 DownTo 1 Do
Write(i, ' ');
ReadLn;
End.
Program TaskF;
Var i: Integer;
Begin
For i := 10 DownTo 1 Do
Begin
Write(i * 10, ' ');
End;
ReadLn;
End.
Program TaskG;
Var i, sum: Integer;
Begin
For i := 1 To 10 Do
sum := sum + i;
WriteLn(sum);
ReadLn;
End.
Program TaskH;
Var i, product: Integer;
Begin
product := 1;
For i := 1 To 5 Do
product := product * i;
WriteLn(product);
ReadLn;
End.
Program TaskI;
Var i, sum: Integer;
Begin
For i := -5 To 5 Do
sum := sum + Abs(i);
WriteLn(sum);
ReadLn;
End.
Program TaskJ;
Var c: Char;
Begin
For c := 'A' To 'Z' Do
Write(c, ' ');
ReadLn;
End.
Объяснение: