Dim shares as Integer = 1000
Dim buyPrice as double = 32.87
Dim SellPrice as double = 33.92
Dim CommissionRate as double = 0.02
Dim C1 as double = shares * buyPrice * CommissionRate
Dim C2 as double = shares * SellPrice * CommissionRate
Console.WriteLine("Joe bought " & shares & " shares for " & shares* buyPrice & "$")
Console.WriteLine("Joe paid " & C1 & "$ " & "to the stock broker")
Console.WriteLine("Joe sold " & shares & " shares for " & SellPrice * shares & "$")
Console.WriteLine("Joe paid " & C2 & "$ " & "to the stock broker")
Console.WriteLine("Joe's balance is " & SellPrice - buyPrice - C1 - C2 & "$" )