Dim s As Integer, sum As Single
s = 44
If s Mod 2 = 1 Then
sum = Sin(s * 3.14 / 180) + Cos(s * 3.14 / 180)
Else
sum = Abs(s)
End If
MsgBox sum
'задач 3
Dim s As Integer, sum As Integer, i As Integer, j As Integer
Do While i < 21
sum = sum + j
Cells(i + 1, 1) = i
Cells(i + 1, 2) = j
Cells(i + 1, 3) = sum
i = i + 1
j = j + 3
Loop
'задач 4
Dim x As Integer, sum As Single, i As Integer, n As Integer
x = 30
n = CInt(InputBox("Введите n"))
For i = 1 To n
sum = sum + Sin(i * x * 3.14 / 180)
Next i
MsgBox sum