Answer to Question #183370 in Visual Basic for Delight

Question #183370

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


1
Expert's answer
2021-04-20T00:54:04-0400
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

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS