My syntax is not exact but it will be something like this
mystring = aqVarToStr(mynumber)
if (aqString.SubString(mystring,0,1 = 1) or (aqString.SubString(mystring,0,1 = 2) then
mynewstring = aqString.Substring(mystring,0,3) + "0"
mynewnumber = aqConvert.StrtoVar(mynewstring)
if (aqString.SubString(mystring,0,1 >= 3) or (aqString.SubString(mystring,0,1 <=7) then
mynewstring = aqString.Substring(mystring,0,3) + "5"
mynewnumber = aqConvert.StrtoVar(mynewstring)
if (aqString.SubString(mystring,0,1 = 8 ) or (aqString.SubString(mystring,0,1 = 9) then
mynewnumber = round(mynumber)