Don't have an account? Register now to chat, post, use our tools, and much more.
This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's Technology & Calculator Open Topic subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

Math and Science => Technology & Calculator Open Topic
Author Message
navyfalcon

Joined: 17 Mar 2008
Posts: 77

 Posted: 04 Jul 2010 04:29:04 pm    Post subject: MLTIPLY prgm does not work for zeros Tried several emails to the author written by austin granger (agranger@visi.com) no response - http://www.ticalc.org/pub/83plus/basic/math/arithmetic/ prgmMTIPLY - program has problems with zeros two digits top number any two digits (not zeros XX 20 -- done does not multiply for: 20, 30, 40, etc. - Does anyone know what the error is ?? - Thank You falcon MTIPLY prgm from ticalc.org - prgmMTIPLY Menu("DIGITS?","TWO",AA,"THREE",BB Lbl AA Input "TOP NUMBER",A Input "BOTTOM NUMBER",B 10->C Lbl CC C+10->C If C>B Then C-10->C Goto DD End If CE ClrHome Output(1,3,A) Output(2,3, Output(2,1,"*") Output(3,1,"------") Output(4,4,E*A) Output(5,3,C*A) Output(6,1,"------") Output(7,3,(A*) Goto ZZ Lbl BB Input "TOP NUM",A Input "BOTTOM NUM",B 10->C 100->D Lbl II D+100->D If D>B Then D-100->D Goto JJ End If DE Lbl KK C+10->C If C>E Then C-10->C Goto LL End If CG:ClrHome Output(1,3,A) Output(2,3, Output(2,1,"*") Output(3,1,"------") Output(4,4,G*A) Output(5,3,C*A) Output(6,2,D*A) Output(7,1,"------" Output(8,2,A* Goto ZZ Lbl ZZ Pause ClrHome Menu("AGAIN?","YES",SU,"NO",US) Lbl SU prgmMULTIPLY Lbl US Stop _____
Bhaliar

Member

Joined: 16 Nov 2009
Posts: 221

 Posted: 07 Jul 2010 01:08:20 pm    Post subject: navyfalcon wrote: MLTIPLY prgm does not work for zeros Tried several emails to the author written by austin granger (agranger@visi.com) no response - http://www.ticalc.org/pub/83plus/basic/math/arithmetic/ prgmMTIPLY - program has problems with zeros two digits top number any two digits (not zeros XX 20 -- done does not multiply for: 20, 30, 40, etc. - Does anyone know what the error is ?? - Thank You falcon MTIPLY prgm from ticalc.org - prgmMTIPLY Menu("DIGITS?","TWO",AA,"THREE",BB Lbl AA Input "TOP NUMBER",A Input "BOTTOM NUMBER",B 10->C Lbl CC C+10->C If C>B Then C-10->C Goto DD End If CE ClrHome Output(1,3,A) Output(2,3, Output(2,1,"*") Output(3,1,"------") Output(4,4,E*A) Output(5,3,C*A) Output(6,1,"------") Output(7,3,(A*) Goto ZZ Lbl BB Input "TOP NUM",A Input "BOTTOM NUM",B 10->C 100->D Lbl II D+100->D If D>B Then D-100->D Goto JJ End If DE Lbl KK C+10->C If C>E Then C-10->C Goto LL End If CG:ClrHome Output(1,3,A) Output(2,3, Output(2,1,"*") Output(3,1,"------") Output(4,4,G*A) Output(5,3,C*A) Output(6,2,D*A) Output(7,1,"------" Output(8,2,A* Goto ZZ Lbl ZZ Pause ClrHome Menu("AGAIN?","YES",SU,"NO",US) Lbl SU prgmMULTIPLY Lbl US Stop _____ Okay so I ran it and see what you mean, and found the problem. When you use the number 20 in either variable, it equals C, which isn't one of the conditionals. It only allows for if c is greater or lesser then, so the code skips those two conditionals, and moves on, not having to edit. the creator then forgot an end. I put the solution in the quote above.Last edited by Guest on 07 Jul 2010 03:59:18 pm; edited 1 time in total
 Display posts from previous: All Posts Oldest FirstNewest First
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.

»
 Page 1 of 1 » All times are GMT - 5 Hours