0
我需要的,如果輸入負數,設定加班時間爲0,如果加班時間大於20將其設置爲20,我進入它如下SmallBASIC和計算月薪員工
TextWindow.Write(" Enter the number of overtime hours: ")
overtime = TextWindow.ReadNumber()
If (overtime < 0 Or overtime > 20) Then
TextWindow.WriteLine("Invalid hours. Hours must be between 0 and 20")
EndIf
我相信我做錯了,但我不知道如何解決它。