dim distance, time, speed, speedlimit as decimal
dim measurement as string
Console.WriteLine("To use metric system (m) say 1 and to use imperial system (ft) say 2")
measurement = console.readline()
Console.WriteLine("enter the distance between sensors (metres)")
distance = Console.ReadLine()
Console.WriteLine("enter the time between sensors (seconds)")
time = Console.Readline()
Console.WriteLine("enter the speedlimit (km/h)")
speedlimit = Console.Readline()
speed = (distance / 1000 / time / 60 / 60)
if speed > speedlimit - 0.1 and speed <speedlimit + 0.5 then
console.WriteLine("You are well over the speed limit")
elseif speed > speedlimit -1.6 and speed <speedlimit +0.1 then
console.writeline("You are a bit above the speedlimit")
elseif speed < speedlimit - 2.5 then
console.writeline("You are close to the speed limit")
Console.Writeline("You are well under the speed limit")
elseif measurement = 2 then
Console.WriteLine("enter the distance between sensors (feet)")
distance = Console.ReadLine()
Console.WriteLine("enter the time between sensors (seconds)")
time = Console.Readline()
Console.WriteLine("enter the speedlimit (miles/h)")
speedlimit = Console.Readline()
if speed > speedlimit - 0.1 and speed <speedlimit + 0.5 then
console.WriteLine("You are well over the speed limit")
elseif speed > speedlimit -1.6 and speed <speedlimit +0.1 then
console.writeline("You are a bit above the speedlimit")
elseif speed < speedlimit - 2.5 then
console.writeline("You are close to the speed limit")
Console.Writeline("You are well under the speed limit")