I'm very far into the TI-BASIC programming language, along with many other languages, but I decided to take it back a step.
I decided to make a fizzbuzz program, but I'm adding a challenge by using only 1 variable (not including Ans).
I'm also trying to make it take up the least amount of room, which adds to the challenge.
If you aren't familiar with what a fizzbuzz is, you can google it (I can't post links).
Here's the objective:
Write a program that prints the numbers from 1 to 100. But for multiples of three print "Fizz" instead of the number and for the multiples of five print "Buzz". For numbers which are multiples of both three and five print "FizzBuzz".
So far I've made many versions but this version is the most compact:
For(F,1,100
"
If not(fPart(F/3
Ans+"FIZZ
If not(fPart(F/5
Ans+"BUZZ
If Ans="
F
Disp Ans
EndI took out a bunch of bytes by skipping end parentheses/quotation marks, and have shaved it down to 62 bytes (not including the name).
My main problem with this program is that it displays a space before the words, and I don't know how to avoid this because adding string to "" results in an error. If anyone could help me fix that without adding to the size of the program, that would be great.
I'm also seeking to shorten this program further, if possible. If anyone could help me shrink the program that much, it would also be great.