Jump to content
IGNORED

New Math Program


BuckoBrand

Recommended Posts

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
  • Like 5
Link to comment
Share on other sites

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 by Opry99er
  • Like 3
Link to comment
Share on other sites

 

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

 

Link to comment
Share on other sites

  • 6 years later...
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 🙂.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...