A Collection of Code Snippets in as Many Programming Languages as Possible
This project is maintained by TheRenegadeCoder
Welcome to the Even Odd in Ti Basic page! Here, you'll find the source code for this program as well as a description of how the program works.
Input "",Str1
"0123456789"->Str2
length(Str1)->L
L<1->E
0->D
0->V
1->N
While E=0 and N<=L
sub(Str1,N,1)->C
inString(Str2,C)-1->K
If C="+" or C="-" Then D>0->E
Else
K<0->E
D+1->D
V*10+K->V
End
N+1->N
End
If E or D<1 Then Disp "Usage: please input a number"
Else
If remainder(V,2)=0 Then Disp "Even"
Else Disp "Odd"
End
End
Even Odd in Ti Basic was written by:
If you see anything you'd like to change or update, please consider contributing.
No 'How to Implement the Solution' section available. Please consider contributing.
No 'How to Run the Solution' section available. Please consider contributing.