1. #1
    High Overlord
    10+ Year Old Account
    Join Date
    Oct 2011
    Location
    Indiana
    Posts
    108

    TI 84+ calculator program help

    I'm using a TI-84 PLUS and have been making programs lately for common math re occurrences. One of them was to calculate the slope of a line between two points, and it is plugged in to read:
    :ClrHome
    : Disp "SLOPE"
    :Input "Y1:",A
    :Input "Y2:",B
    :Input "X1:",C
    :Input "X2:",D
    :ClrHome
    : Disp "SLOPE:"
    : Disp (B-A)/(D-C)
    :End

    I tested it out with points (1,-4) and (-4,2), which the answer should be -1.2 -- With Y1: -4, Y2: 2, X1: 1, X2: -4, I get "ERR:SYNTAX". If I choose to quit then it exits the program and says "SLOPE: -1.2 Error". If I choose to goto, it takes me to Pgrm Edit and puts me down at :End.

    Does anyone who is familiar with the TI84 calculator and programming know what my problem is? The distance formula I made does the same thing, but a more complex program I made to calculate either compound, continuous, or present interest doesn't run into this.

    Thanks!
    Last edited by Ninjakiwi; 2011-12-04 at 08:47 PM. Reason: Edit: :Disp was making a smiley face

  2. #2
    Legendary! llDemonll's Avatar
    15+ Year Old Account
    Join Date
    Apr 2008
    Location
    Washington
    Posts
    6,582
    Code:
    :ClrHome
    :Prompt Y1, Y2, X1, X2
    :Y1-Y2→A
    :X2-X1→B
    :B/A→C
    :DISP C
    I can't tell you the problem, but that is one way to simplify the program (granted, I haven't touched a calculator to program in a few years, and that was on a TI-83+
    "I'm glad you play better than you read/post on forums." -Ninety
    BF3 Profile | Steam Profile | Assemble a Computer in 9.75 Steps! | Video Rendering Done Right

  3. #3
    Been a long while since using TI Basic, but I think you need a STOP as well as END
    Author of Instance Profit Tracker
    Find out how much gold you earn soloing raids and dungeons

    Curse | GitHub
    WowInterface

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •