Alright so i have this assigment to make a program in turing that counts down from 100 by 7's and i have treid various things and cant seem to get it to work
*i know i need to subtract and i know i need to use the loop*
_________________________________________________
% Justin TIK2
% Feb 15, 2006
% count down by 7's
var c1, c2, b : real
c2 := 100 - 7
loop
c1 := c2 - 7 -7
put c1
exit when c1 = 5
end loop
___________________________________________________
that is what i have i know that it is not even close to working
Archived topic from Iceteks, old topic ID:4175, old post ID:34002
Need help with turing
Need help with turing
Are you allowed to use counted loops? Because if you are it would be better structure to use a counted loop that's decrementing rather than incrementing. That way you just output the index after every loop. I don't remember the exact turing coding but if you post a example of the counted loop's syntax it might refresh my memory.
Archived topic from Iceteks, old topic ID:4175, old post ID:34005
Archived topic from Iceteks, old topic ID:4175, old post ID:34005