QBasic helpby George (no login)How do I get numbers to be printed with 0's infront, in order to have the number only a certain amount of digits, like: 0001,0002,0003,...,0010,0011,0012,...,0100,0101,0102,...,1000,1002,... I need this very urgent for school, and this is what I have so far. It wont display the number 0 as 000 and it only goes up to 999. FOR i = 1 TO 199 j = 2 - INT(LOG(i) / LOG(10)) s$ = STRING$(j, "0") + LTRIM$(STR$(i)) PRINT s$ SLEEP NEXT |
| Response Title | Author and Date |
| Re: QBasic help | George on Apr 23 |
| You almost had it. | on Apr 23 |
| Another solution: | Solitaire on Apr 24 |
| That gives you E numbers... | on Apr 24 |
| That's pretty elaborate | George on Apr 24 |