Задача 1:
Imports System
Module MainModule
Sub Main()
Dim a, b, h, S As Double
Console.Write("a = ")
a = Console.ReadLine()
Console.Write("b = ")
b = Console.ReadLine()
Console.Write("h = ")
h = Console.ReadLine()
S = (a + b) / 2 * h
Console.Write("S = ")
Console.WriteLine(S)
Console.ReadKey
End Sub
End Module
Задача 2:
Imports System
Module MainModule
Sub Main()
Dim x, y As Double
Console.Write("x = ")
x = Console.ReadLine()
Console.Write("y = ")
y = Console.ReadLine()
If (x < 0) And (y < 0) Then
x = -x
y = -y
Else If (x < 0) Or (y < 0) Then
x += 0.5
y += 0.5
Else If (x >= 0.5) And (x <= 2) And (y >= 0.5) And (y <= 2) Then<br> x /= 10
y /= 10
End If
Console.Write("x = ")
Console.WriteLine(x)
Console.Write("y = ")
Console.WriteLine(y)
Console.ReadKey
End Sub
End Module