1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
Imports System.Numerics
Public Class Form1
Private arr(3) As Complex
Private Sub Form1_Load(sender As Object, e As System.EventArgs) Handles Me.Load
arr(0) = New Complex(2, 7)
arr(1) = New Complex(4, 0)
arr(2) = New Complex(3, 6)
arr(3) = New Complex(3, -5)
' on utilise des fonctions shared ou static en CSharp
' de la bibiotheteque .Net System.Numerics
'addition
Dim resultAdd As Complex = Complex.Add(arr(0), arr(1))
'soustraction
Dim resultMinus As Complex = Complex.Subtract(arr(2), arr(1))
'multiplication
Dim resultMul As Complex = Complex.Multiply(arr(3), arr(0))
'division
Dim resultDiv As Complex = Complex.Divide(arr(0), arr(1))
' & d'autres fonctions à explorer
End Sub
End Class |
Partager