Advertisement
Guest User

Price calculator

a guest
Jun 19th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.91 KB | None | 0 0
  1. Dim ttbar As Integer
  2. Dim pg As Integer
  3. Dim ktc As Integer
  4. Dim tfktc As Integer
  5. Dim wt As Decimal
  6. Dim ppercent As Decimal
  7. Dim grosswt As Decimal
  8. Dim labourprice As Decimal
  9. Dim labour As Decimal
  10. Dim price As Decimal
  11. Dim stonecharges As Decimal
  12. Dim lop As Char
  13.  
  14.  
  15. Console.WriteLine("Dear Sir! Please Enter Today Price Of TT Bar")
  16. ttbar = Console.ReadLine
  17. pg = ttbar / 116.64
  18. Do
  19.  
  20. Console.WriteLine("24KT = " & pg * 12.15)
  21. Console.WriteLine("22KT = " & (pg * 12.15) - 2000)
  22. Console.WriteLine("21KT = " & (pg * 12.15) - 3000)
  23.  
  24. Console.WriteLine("Type 21 for 21KT OR 22 for 22KT")
  25. ktc = Console.ReadLine
  26. If ktc = "22" Then
  27. tfktc = (pg * 12.15) - 2000
  28. ElseIf ktc = "21" Then
  29. tfktc = (pg * 12.15) - 3000
  30. Else
  31. Console.WriteLine("Invaild Input")
  32. End If
  33.  
  34. Console.WriteLine("Please Enter WT in Grams")
  35. wt = Console.ReadLine
  36.  
  37. Console.WriteLine("Please Enter Stone Charges")
  38. stonecharges = Console.ReadLine
  39.  
  40. Console.WriteLine("Please Enter Polish in %")
  41. ppercent = Console.ReadLine
  42. grosswt = (wt * ppercent / 100) + wt
  43.  
  44. Console.WriteLine("Please Enter Labour Charges")
  45. labourprice = Console.ReadLine
  46. labour = grosswt / 12.15 * labourprice
  47.  
  48. price = (grosswt * tfktc) + labour + stonecharges
  49.  
  50. Console.WriteLine("Price PKR " & price & " " & " And weight is " & grosswt / 12.15)
  51. Console.WriteLine(" ")
  52.  
  53. Console.WriteLine("Press Y For New Calulation")
  54. lop = Console.ReadLine
  55. Console.Clear()
  56. Loop Until lop = "Y"
  57.  
  58. Console.ReadKey()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement