I just checked that an empty 1K program with a name of 1 Character takes 143 Bytes in a .P file.
With some help of Dr. Beep I reduced the code a bit more:
The length of the .P file is now 271 bytes. Minus the 143 is 128 bytes in total with variables... a magic number
We have to go for 64 Bytes now!
FIZZBUZZ
Re: FIZZBUZZ
- Attachments
-
- fizz1k_5.P
- (271 Bytes) Downloaded 174 times
-
- f1k5.JPG (4.68 KiB) Viewed 3228 times
In theory, there is no difference between theory and practice. But, in practice, there is.
Re: FIZZBUZZ
The rules are simple -
write out the values 1 to 100 on screen
If the value is divisble by 3 write 'FIZZ' after the number
If the value is divisble by 5 write 'BUZZ' after the number
If the value is divisble by 3 and 5 write 'FIZZBUZZ' after the number
No word about STOP after program, only 100 numbers to the screen.
100 PRINT A;"FIZZ" AND A/INT PI=INT (A/INT PI);"BUZZ" AND A/B=INT (A/B);" ";
101 LET A=A+SGN PI
102 GOTO A
A starts with 1
write out the values 1 to 100 on screen
If the value is divisble by 3 write 'FIZZ' after the number
If the value is divisble by 5 write 'BUZZ' after the number
If the value is divisble by 3 and 5 write 'FIZZBUZZ' after the number
No word about STOP after program, only 100 numbers to the screen.
100 PRINT A;"FIZZ" AND A/INT PI=INT (A/INT PI);"BUZZ" AND A/B=INT (A/B);" ";
101 LET A=A+SGN PI
102 GOTO A
A starts with 1