Answer to Question #186072 in Visual Basic for tafadzwa

Question #186072

Sue sells day old chicks after they hatch from eggs. She buys the eggs at a fixed cost of 11c per egg. She determined that she spends R1.10 on electricity and other costs per egg to hatch it. she needs a program to calculate the sales price of the chicks. she would like to make 15% profit per chick. Number of chicks 5 .The program must accept the number of chicks that a client wants and then calculate and display the sales price.


1
Expert's answer
2021-04-27T14:54:18-0400
Module Module1


    Sub Main()
        'Get the number of chicks
        Console.Write("Enter the number of chicks: ")
        Dim numberChicks As Integer = Integer.Parse(Console.ReadLine())
        Dim moneySpent As Double = (0.11 + 1.1D) * numberChicks
        'calculating the sales price
        Dim salesPrice As Double = (moneySpent + moneySpent * 0.15D) / numberChicks
        Console.WriteLine("The sales price: R" + salesPrice.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