
-----------------------------------
gayden
Mon Mar 02, 2015 10:36 am

Program is stuck at &quot;Executing.&quot;
-----------------------------------
Not sure if the purpose of the program is really relevant or not, but basically it's meant to complete Shawnar's Process, which dictates: "Given any positive number, you can perform the following operations on it:
-If even, divide by two
-If odd, multiply by three and then add one
and eventually you will reach the number one.

Example: 13
13 * 3 + 1 = 40
40 / 2 = 20
20 / 2 = 10
10 / 2 = 5
5 * 3 + 1 = 16
16 / 2 = 8
8 / 2 = 4
4 / 2 = 2
2 / 2 = 1

Anyway, when I run the program it sort of pauses at line 13. The Turing window says "Executing." I am given no error.

[code]var font1 := Font.New ("Times:12")
Font.Draw ("Shawnar's Process", 230, 380, font1, red)

var posnum, xnum : real
var num, counter : int
var ans : string (1)
counter := 0

locate (3, 5)
put "How many numbers do you want to test? " ..
get num
for i : 1 .. num
    put "Enter the positive number for test #", i, ": " ..
    get posnum
    if (posnum 