How can I display this on the same line using the length( and the Output( command:

Y= 7
not
Y=
7


I want the ones place of the number to be on the coordinates (1,16). I have still been thinking about the factoring program. If the solutions are 5/2, 2 how can I store the numerator and denominator as different variables?
Do Output(1,1,"Y= "):Output(1,16-(int(log(Y))),Y)
1+int(log(X will get you the number of digits in X, which can help you left-align your outputs.

To separate the numerator from the denominator, you need a routine that will do just that. The Euclidean algorithm is a popular choice. I also have a converter written up on my website that uses convergents in the continued fraction expansion of the input.
1+int(log(X is only for positive integers but can i use the length command to do this?

Weregoose I will check that out.
The length() command can only be used on strings.
Interesting, but my friend made a program that displayed the number on the same line, but I am not sure if he used the length( command. Is there any other command to display on the same line?
You could use the Text() command for the graphscreen, use a combination of Disp, ClrHome, and Output(), or use my code that I posted above. Smile I'm sure Weregoose will know more ways of doing this, though. Razz
length(det(1,number)) will give you the length of the number in string form if you're running under Doors CS (or Celtic III).
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement