Pele needs a program to calculate his bank balance at the end of the month. Get his balance at the beginning of the month and his deposit and withdrawal amounts during the month. Bank costs are fixed at R55.66 per month. Calculate his balance at the end of the month.
Beginning balance:R1502.50
Deposits during the month:R822.00
Withdrawals during the month:R1200.00
Module Module1
Sub Main()
Const BANK_COSTS As Double = 55.66
'Get his balance at the beginning of the month and his deposit and withdrawal amounts during the month.
Console.Write("Beginning(balance): R")
Dim beginningBalance As Double = Double.Parse(Console.ReadLine())
Console.Write("Deposits during the month: R")
Dim deposits As Double = Double.Parse(Console.ReadLine())
Console.Write("Withdrawals during the month: R")
Dim withdrawals As Double = Double.Parse(Console.ReadLine())
'Bank costs are fixed at R55.66 per month. Calculate his balance at the end of the month.
Dim balance As Double = beginningBalance + deposits - withdrawals - BANK_COSTS
Console.WriteLine("The balance at the end of the month: R" + balance.ToString("N"))
Console.ReadLine()
End Sub
End Module
Comments
Leave a comment