Hi, this may seem like a nooby question.If i try use math.round and it doesnt appear to work.
This is an image of my code,it went kinda buggy when i pasted it it :L
Im very inxperienced and any help would be appreciated
Any advice once more is appreciated
Please turn Option Strict On at the top of your code.
You are attempting to do math with a string! Of course it won't work.
Console.ReadLine only works with string input, which must then be converted into the correct number type.
Dim order As Double, snum As String
Console.Write("Enter value: ")
snum = Console.ReadLine()
Double.TryParse(snum, order)
'etc
Now you can use the numeric value of order to test for the correct range and round it out.
String*
also thanks JohnH i got it to work. One question if i put in a number as an integer value(dimmed as decimal) like 90 how could i get it to 90.00?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.