Jump to content



Photo
- - - - -

Need help with program with reaction.

Classpad II program

  • Please log in to reply
4 replies to this topic

#1 Roald

Roald

    Newbie

  • Members
  • Pip
  • 4 posts

  • Calculators:
    Casio Classpad II

Posted 19 January 2017 - 09:09 PM

Hi, Im new to this forum and new to these calculators.
I've started to use my Classpad II in advance of technical school start.

Im trying to make a program that will help me determine if a beam has the right capacity or not.
So far so good, the program do what I describe, but I would love to have it to tell me if suggested beam is good enough or not.
Here is my program (Im norwegian, so text is probably not translated perfectly):

Input A, "Load"
Input B, "Load factor"
Print "Load is:"
Print AxB
Input C, "Beam length"
Print "Torque load is:"
Print (AxB)xC/4
Input D, "Material strenght"
Input E, "Material factor"
Print D/E
Input F, " Material Cross Section"
Print "Dimensioning torque capacity"
Print (D/E)xF/1000000

I would very much like to have the program to react at the bottom line answer.
Is it possible to make the program to tell me with ex. red letters if Torque load (AxB)xC/4) is higher than Torque capacity (D/ExF/1000000)
It does not have to be in red letters if that's not possible.

Best regards
Roald Riska

#2 frankmar98

frankmar98

    Casio Freak

  • Moderator
  • PipPipPipPip
  • 109 posts
  • Gender:Male
  • Location:Spain
  • Interests:Science, programming

  • Calculators:
    CFX-9970G
    fx-9860G SD
    HP Prime
    TI-84+CE-T TI-83+
    fx-9750GII SH4-A
    CP-300 fx-4800p
    fx-3650pII PB-100
    fx-991SP X fx-991ES plus

Posted 19 January 2017 - 09:44 PM

Hello, Roald, and welcome to UCF!

 

You should introduce yourself in this topic: 

http://community.cas...ge-7#entry60978

 

Your program is a good input -- calculations -- output program.

 

The next step in your programming learning process, is to learn conditionals (if -- then -- else  -- EndIf) and then loops. (useful to make the calculator make simple decisions)

 

I don't know the Classpad language exactly syntax. You should learn control flow statements with a basic programming book, and then translate it to the classpad syntax using the manual.

 

Good luck with programming!


  • Roald likes this

#3 pan.gejt

pan.gejt

    Casio Freak

  • Members
  • PipPipPipPip
  • 137 posts
  • Gender:Male
  • Location:CZ

  • Calculators:
    fx-880, fx-6300G, fx-9700GE, fx-9860G Slim, Classpad 330-A, TI-Nspire + keypad, TI-Nspire CAS, TI-Nspire CX CAS,TI-89 Titanium, HP-50g, SEC-101, fx-991ES PLUS, fx-991DE PLUS, fx-CP400, Canon X MARK I PRO, Citizen SRP-75,

Posted 20 January 2017 - 10:35 AM

Maybe like this

 

ClrText
Input A,"load"
Input B,"load factor"
Input C,"beam length"
Input D,"material strength"
Input E,"material factor"
Input F,"material cross section"
Print "load is:",ColorBlack
Print A×B
A×B×C/4=>G
Print "torque load is:",ColorMagenta
Print G
Print "D/E",ColorYellow
Print D/E
(D/E)×F/1000000=>H
Print "dimensioning torque capacity",ColorCyan
Print H
If G>H
Then
Print "torque load is higher than torque capacity",ColorRed
Else
Print "torque load is lower than torque capacity",ColorGreen
IfEnd

 

 

Notice: You can use 7 colors to specify the colors

ColorBlack

ColorBlue

ColorRed

ColorMagenta

ColorGreen

ColorCyan

ColorYellow


  • Roald likes this

#4 Roald

Roald

    Newbie

  • Members
  • Pip
  • 4 posts

  • Calculators:
    Casio Classpad II

Posted 23 January 2017 - 07:54 PM

Hi pan.gejt!

 

Thank you very much.

I will try this tonight :)



#5 Roald

Roald

    Newbie

  • Members
  • Pip
  • 4 posts

  • Calculators:
    Casio Classpad II

Posted 24 January 2017 - 06:26 PM

Hi pan.gejt!

 

It worked perceft, thank you :)






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users