
#1
Posted 19 January 2017 - 08:09 PM
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
Posted 19 January 2017 - 08: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
Posted 20 January 2017 - 09: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
Posted 23 January 2017 - 06:54 PM
Hi pan.gejt!
Thank you very much.
I will try this tonight
#5
Posted 24 January 2017 - 05:26 PM
Hi pan.gejt!
It worked perceft, thank you
2 user(s) are reading this topic
0 members, 2 guests, 0 anonymous users