Liebe alle,
hier unsere HÜ.
MFG,
Jana, Sylvia und Birgit
########## 1 ###########
SAY "1. What is your name?"
PARSE PULL name
SAY "Your name is:" pp(name)
SAY "2. What is your last name?"
parse PULL last.
SAY "Your last name is:" pp(last.)
SAY "3. how old are you?"
parse pull old
if old <25 then say "Wow, you are very young"
if old >= 25 then say "Wow, you must be very wise"
EXIT
PP : RETURN "[" || ARG(1) || "]" -- "pretty print" ;)
Output:
rexx C:\Users\h9949628\IdeaProjects\untitled\hh.cls
1. Wie ist dein Vorname?
Anna
Dein Vorname ist: [Anna]
2. Wie ist dein Nachname?
Bauer
Dein Nachname ist: [Bauer]
3. Wie alt bist du?
33
Wow, du bist sehr klug!
Process finished with exit code 0
############## 2 ####################
/* SELF PROGRAM DATE
define day month year from DATE function*/
datum= "DATE"()
say datum
parse var datum day month year
/* define ending for day*/
IF (day = 1 or day =21 or day =31) THEN ending = "st of"
IF (day = 2 or day =22) THEN ending = "nd of"
IF day = 3 THEN ending = "rd of"
IF day >3 & day <31 then ending = "th of"
/* define ending for month*/
if month = "Jan" then ending2 = "uary"
if month = "Feb" then ending2 = "ruary"
if month = "Mar" then ending2 = "ch"
if month = "Apr" then ending2 = "il"
if month = "May" then ending2 = ""
if month = "Jun" then ending2 = "e"
if month = "Jul" then ending2 = "y"
if month = "Aug" then ending2 = "ust"
if month = "Sep" then ending2 = "tempber"
if month = "Oct" then ending2 = "ober"
if month = "Nov" | month = "Dec" THEN ending2 ="ember"
SAY date() -- date self programmed
DATE:
RETURN year"," day || ending month || ending2
Output
27 Oct 2022
2022, 27th of October
##### 3 #####
X = 2
DO until x > 5
Say Hallo
Say Du!!
X = x +3
END
Output
Hallo
Du!
Hallo
Du!