Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
35
Task/User-input-Text/Axe/user-input-text.axe
Normal file
35
Task/User-input-Text/Axe/user-input-text.axe
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
Disp "String:"
|
||||
input→A
|
||||
length(A)→L
|
||||
|
||||
.Copy the string to a safe location
|
||||
Copy(A,L₁,L)
|
||||
|
||||
.Display the string
|
||||
Disp "You entered:",i
|
||||
For(I,0,L-1)
|
||||
Disp {L₁+I}►Char
|
||||
End
|
||||
Disp i
|
||||
|
||||
Disp "Integer:",i
|
||||
input→B
|
||||
length(B)→L
|
||||
|
||||
.Parse the string and convert to an integer
|
||||
0→C
|
||||
For(I,0,L-1)
|
||||
{B+I}-'0'→N
|
||||
If N>10
|
||||
.Error checking
|
||||
Disp "Not a number",i
|
||||
Return
|
||||
End
|
||||
C*10+N→C
|
||||
End
|
||||
|
||||
.Display and check the integer
|
||||
Disp "You entered:",i,C►Dec,i
|
||||
If C≠7500
|
||||
Disp "That isn't 7500"
|
||||
End
|
||||
Loading…
Add table
Add a link
Reference in a new issue