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.
Module Module1
Sub Main()
Const FIXED_COST_PER_EGG As Double = 0.11D
Const ELECTRICITY_COST As Double = 1.1D
Const PROFIT_PERCENT As Double = 0.15D
'Read the the number of chicks
Console.Write("Enter the the number of chicks: ")
Dim numberChicks As Integer = Integer.Parse(Console.ReadLine())
Dim spentMoney As Double = numberChicks * (FIXED_COST_PER_EGG + ELECTRICITY_COST)
'calculate the sales price
Dim salesPrice As Double = (spentMoney + spentMoney * PROFIT_PERCENT) / numberChicks
'Display the sales price
Console.WriteLine("The sales price: R" + salesPrice.ToString("N"))
Console.ReadLine()
End Sub
End Module
Comments
Leave a comment