BuckoBrand Posted March 3, 2017 Share Posted March 3, 2017 Hi.Opry99er and I were coding a new program.Copy this and paste it onto Classic99.: The thing is,it's more like a calculator than a program.You put in 2 numbers in into 2 variables and it adds them together. Have fun! 100 CALL CLEAR 110 CALL SCREEN(16) 120 PRINT "THIS IS AN ADDITION PROGRAM" 130 PRINT :: PRINT 140 PRINT "ENTER TWO NUMBERS, AND THE":"PROGRAM WILL ADD THEM FOR":"YOU!" 150 PRINT :: PRINT :: PRINT :: PRINT "PRESS ANY KEY TO CONTINUE" 160 CALL KEY(0,K,S):: IF S=0 THEN 160 170 CALL CLEAR :: CALL SCREEN(12) 180 DISPLAY AT(20,1):"ENTER THE FIRST NUMBER" 190 INPUT NUM1 200 DISPLAY AT(10,10):NUM1;"+" 210 DISPLAY AT(21,1):"ENTER THE SECOND NUMBER" 220 INPUT NUM2 230 DISPLAY AT(9,14):NUM2;; 240 SUM=NUM1+NUM2 250 CALL CLEAR 260 DISPLAY AT(10,10):NUM1;"+";NUM2;"=";SUM 270 PRINT "PRESS ANY KEY TO ADD MORE":"NUMBERS" 280 GOTO 160 5 Quote Link to comment Share on other sites More sharing options...
+jedimatt42 Posted March 3, 2017 Share Posted March 3, 2017 I like how it prints the equation as you are building it when you enter each number. Does the ';;' at the end of line 230 do anything? or is that leftover from edits? -M@ 1 Quote Link to comment Share on other sites More sharing options...
Opry99er Posted March 3, 2017 Share Posted March 3, 2017 (edited) Buck is asleep now. I don't think he meant to put those there in the finished program. His plan here is to make a TI calculator for his sister, Daisy. Tomorrow he is going to add subtraction and make a startup menu for the calculator while I am at work. Really the only thing I had to help him with was lining up the DISPLAY on LINE 230. He was trying to make it display the values onscreen, but when the PRINT rolled after the INPUT, it threw off the row value by 1. It was frustrating him that it did not show up correctly, and I had to help him understand that the line had rolled up and he had to decrease his row value by 1 to make it line up. He pretty much had the rest of it done. You'd think a 7 year old would want to work on games, but he spends most of his TI time these days playing with math functions. Cool kid. Edited March 3, 2017 by Opry99er 3 Quote Link to comment Share on other sites More sharing options...
sometimes99er Posted March 3, 2017 Share Posted March 3, 2017 Nice work. If you use DISPLAY AT, then you might as well take a look at ACCEPT AT. Quote Link to comment Share on other sites More sharing options...
RXB Posted March 3, 2017 Share Posted March 3, 2017 Hi.Opry99er and I were coding a new program.Copy this and paste it onto Classic99.: The thing is,it's more like a calculator than a program.You put in 2 numbers in into 2 variables and it adds them together. Have fun! 100 CALL CLEAR 110 CALL SCREEN(16) 120 PRINT "THIS IS AN ADDITION PROGRAM" 130 PRINT :: PRINT 140 PRINT "ENTER TWO NUMBERS, AND THE":"PROGRAM WILL ADD THEM FOR":"YOU!" 150 PRINT :: PRINT :: PRINT :: PRINT "PRESS ANY KEY TO CONTINUE" 160 CALL KEY(0,K,S):: IF S=0 THEN 160 170 CALL CLEAR :: CALL SCREEN(12) 180 DISPLAY AT(20,1):"ENTER THE FIRST NUMBER" 190 INPUT NUM1 200 DISPLAY AT(10,10):NUM1;"+" 210 DISPLAY AT(21,1):"ENTER THE SECOND NUMBER" 220 INPUT NUM2 230 DISPLAY AT(9,14):NUM2;; 240 SUM=NUM1+NUM2 250 CALL CLEAR 260 DISPLAY AT(10,10):NUM1;"+";NUM2;"=";SUM 270 PRINT "PRESS ANY KEY TO ADD MORE":"NUMBERS" 280 GOTO 160 Hmm change line 120 120 PRINT "THIS IS AN ADDITION PROGRAM": : : And delete line 130 as unneeded. Next change line 140 140 PRINT "ENTER TWO NUMBERS, AND THE":"PROGRAM WILL ADD THEM FOR":"YOU!": : : : Next change the line in 150 150 PRINT "PRESS ANY KEY TO CONTINUE" This is a much cleaner code as a : after a PRINT is just like typing PRINT :: PRINT Quote Link to comment Share on other sites More sharing options...
jrhodes Posted January 20 Share Posted January 20 On 3/3/2017 at 12:37 AM, Opry99er said: Buck is asleep now. I don't think he meant to put those there in the finished program. His plan here is to make a TI calculator for his sister, Daisy. Tomorrow he is going to add subtraction and make a startup menu for the calculator while I am at work. Really the only thing I had to help him with was lining up the DISPLAY on LINE 230. He was trying to make it display the values onscreen, but when the PRINT rolled after the INPUT, it threw off the row value by 1. It was frustrating him that it did not show up correctly, and I had to help him understand that the line had rolled up and he had to decrease his row value by 1 to make it line up. He pretty much had the rest of it done. You'd think a 7 year old would want to work on games, but he spends most of his TI time these days playing with math functions. Cool kid. Buck is pretty smart. Been a little while since i seen anything from him. Hope all is well with him and you 🙂. Quote Link to comment Share on other sites More sharing options...
senior_falcon Posted January 21 Share Posted January 21 On 3/3/2017 at 1:37 AM, Opry99er said: You'd think a 7 year old would want to work on games, but he spends most of his TI time these days playing with math functions. There is hope for the future! 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.